summaryrefslogtreecommitdiff
path: root/tools/dev/which-error.py
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-03-18 13:33:26 +0000
committer <>2015-07-08 14:41:01 +0000
commitbb0ef45f7c46b0ae221b26265ef98a768c33f820 (patch)
tree98bae10dde41c746c51ae97ec4f879e330415aa7 /tools/dev/which-error.py
parent239dfafe71711b2f4c43d7b90a1228d7bdc5195e (diff)
downloadsubversion-tarball-subversion-1.8.13.tar.gz
Imported from /home/lorry/working-area/delta_subversion-tarball/subversion-1.8.13.tar.gz.subversion-1.8.13
Diffstat (limited to 'tools/dev/which-error.py')
-rwxr-xr-xtools/dev/which-error.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/tools/dev/which-error.py b/tools/dev/which-error.py
index 55abba7..dc6a8f5 100755
--- a/tools/dev/which-error.py
+++ b/tools/dev/which-error.py
@@ -23,12 +23,13 @@
# under the License.
# ====================================================================
#
-# $HeadURL: http://svn.apache.org/repos/asf/subversion/branches/1.7.x/tools/dev/which-error.py $
-# $LastChangedDate: 2011-07-08 13:53:27 +0000 (Fri, 08 Jul 2011) $
-# $LastChangedBy: philip $
-# $LastChangedRevision: 1144315 $
+# $HeadURL: http://svn.apache.org/repos/asf/subversion/branches/1.8.x/tools/dev/which-error.py $
+# $LastChangedDate: 2012-03-30 20:29:32 +0000 (Fri, 30 Mar 2012) $
+# $LastChangedBy: danielsh $
+# $LastChangedRevision: 1307598 $
#
+import errno
import sys
import os.path
import re
@@ -68,6 +69,13 @@ codes. This can be done in variety of ways:
def get_errors():
errs = {}
+ ## errno values.
+ errs.update(errno.errorcode)
+ ## APR-defined errors, from apr_errno.h.
+ for line in open(os.path.join(os.path.dirname(sys.argv[0]), 'aprerr.txt')):
+ key, _, val = line.split()
+ errs[int(val)] = key
+ ## Subversion errors, from svn_error_codes.h.
for key in vars(core):
if key.find('SVN_ERR_') == 0:
try:
@@ -81,7 +89,10 @@ def print_error(code):
try:
print('%08d %s' % (code, __svn_error_codes[code]))
except KeyError:
- print('%08d *** UNKNOWN ERROR CODE ***' % (code))
+ if code == -41:
+ print("Sit by a lake.")
+ else:
+ print('%08d *** UNKNOWN ERROR CODE ***' % (code))
if __name__ == "__main__":
global __svn_error_codes