comparison mercurial/error.py @ 30578:b0ebab239f90

error: add ProgrammingError We have requirement to express "this is clearly an error caused by the programmer". The code base uses RuntimeError for that in some places, not ideal. So let's add a formal exception for that.
author Jun Wu <quark@fb.com>
date Tue, 06 Dec 2016 14:57:47 +0000
parents 318a24b52eeb
children 0f865311ae3f
comparison
equal deleted inserted replaced
30577:cfb227016d01 30578:b0ebab239f90
165 class SignatureError(Exception): 165 class SignatureError(Exception):
166 pass 166 pass
167 167
168 class PushRaced(RuntimeError): 168 class PushRaced(RuntimeError):
169 """An exception raised during unbundling that indicate a push race""" 169 """An exception raised during unbundling that indicate a push race"""
170
171 class ProgrammingError(RuntimeError):
172 """Raised if a developer has made some mistake"""
170 173
171 # bundle2 related errors 174 # bundle2 related errors
172 class BundleValueError(ValueError): 175 class BundleValueError(ValueError):
173 """error raised when bundle2 cannot be processed""" 176 """error raised when bundle2 cannot be processed"""
174 177