diff mercurial/hgweb/hgweb_mod.py @ 39777:b63dee7bd0d9

global: replace most uses of RevlogError with StorageError (API) When catching errors in storage, we should be catching StorageError instead of RevlogError. When throwing errors related to storage, we shouldn't be using RevlogError unless we know the error stemmed from revlogs. And we only reliably know that if we're in revlog.py or are inheriting from a type defined in revlog.py. Differential Revision: https://phab.mercurial-scm.org/D4655
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 18 Sep 2018 16:47:09 -0700
parents 17ca967e9fca
children 2cd5f1fac788
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Tue Sep 18 16:45:13 2018 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Tue Sep 18 16:47:09 2018 -0700
@@ -435,7 +435,7 @@
             res.status = '404 Not Found'
             res.headers['Content-Type'] = ctype
             return rctx.sendtemplate('error', error=msg)
-        except (error.RepoError, error.RevlogError) as e:
+        except (error.RepoError, error.StorageError) as e:
             res.status = '500 Internal Server Error'
             res.headers['Content-Type'] = ctype
             return rctx.sendtemplate('error', error=pycompat.bytestr(e))