From cb3fac1ea71f50b1bf7dcfe032c639392915d32a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 14 Jun 2017 10:09:48 +0200 Subject: sb: Make error messages unique Enable traceability from the error message to the script location. This eases debugging. --- source-builder/sb/path.py | 8 ++++---- 1 file 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')) -- cgit v1.2.3