summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-14 10:09:48 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-14 10:27:16 +0200
commitcb3fac1ea71f50b1bf7dcfe032c639392915d32a (patch)
tree31e2e7d5d79ca1b31c76e8cb1a73065bdc052920
parentFix for GCC 6 while building with GCC 7+ (diff)
downloadrtems-source-builder-cb3fac1ea71f50b1bf7dcfe032c639392915d32a.tar.bz2
sb: Make error messages unique
Enable traceability from the error message to the script location. This eases debugging.
-rw-r--r--source-builder/sb/path.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index 43f41eb..2c20248 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -179,7 +179,7 @@ def copy(src, dst):
if WindowsError is not None and isinstance(why, WindowsError):
pass
else:
- raise error.general('copying tree: %s -> %s: %s' % (hsrc, hdst, str(why)))
+ raise error.general('copying tree (1): %s -> %s: %s' % (hsrc, hdst, str(why)))
def copy_tree(src, dst):
trace = False
@@ -233,10 +233,10 @@ def copy_tree(src, dst):
else:
shutil.copy2(host(srcname), host(dstname))
except shutil.Error as err:
- raise error.general('copying tree: %s -> %s: %s' % \
+ raise error.general('copying tree (2): %s -> %s: %s' % \
(hsrc, hdst, str(err)))
except EnvironmentError as why:
- raise error.general('copying tree: %s -> %s: %s' % \
+ raise error.general('copying tree (3): %s -> %s: %s' % \
(srcname, dstname, str(why)))
try:
shutil.copystat(hsrc, hdst)
@@ -245,7 +245,7 @@ def copy_tree(src, dst):
if WindowsError is not None and isinstance(why, WindowsError):
pass
else:
- raise error.general('copying tree: %s -> %s: %s' % (hsrc, hdst, str(why)))
+ raise error.general('copying tree (4): %s -> %s: %s' % (hsrc, hdst, str(why)))
if __name__ == '__main__':
print(host('/a/b/c/d-e-f'))