diff mercurial/error.py @ 26692:8d1cfd77b64f

hook: raise a separate exception for when loading a hook fails For easier catching.
author Siddharth Agarwal <sid0@fb.com>
date Mon, 12 Oct 2015 18:49:23 -0700
parents 634666c48b7d
children 338af85109dd
line wrap: on
line diff
--- a/mercurial/error.py	Wed Oct 14 11:05:53 2015 -0700
+++ b/mercurial/error.py	Mon Oct 12 18:49:23 2015 -0700
@@ -57,6 +57,12 @@
     """Raised if a command needs to print an error and exit."""
     pass
 
+class HookLoadError(Abort):
+    """raised when loading a hook fails, aborting an operation
+
+    Exists to allow more specialized catching."""
+    pass
+
 class HookAbort(Abort):
     """raised when a validation hook fails, aborting an operation