Browse code

provide a better exception / error reporting message, bug #158

Trying to cut down on the duplicates to the -bugs mailing list.

Matt Domsch authored on 2013/04/25 07:27:19
Showing 1 changed files
... ...
@@ -2040,11 +2040,20 @@ def report_exception(e):
2040 2040
         sys.stderr.write("""
2041 2041
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2042 2042
     An unexpected error has occurred.
2043
-  Please report the following lines to:
2043
+  Please try reproducing the error using
2044
+  the latest s3cmd code from the git master
2045
+  branch found at:
2046
+    https://github.com/s3tools/s3cmd
2047
+  If the error persists, please report the
2048
+  following lines (removing any private
2049
+  info as necessary) to:
2044 2050
    s3tools-bugs@lists.sourceforge.net
2045 2051
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2046 2052
 
2047 2053
 """)
2054
+        s = ' '.join(sys.argv)
2055
+        sys.stderr.write("""Invoked as: %s""") % s
2056
+
2048 2057
         tb = traceback.format_exc(sys.exc_info())
2049 2058
         e_class = str(e.__class__)
2050 2059
         e_class = e_class[e_class.rfind(".")+1 : -2]
... ...
@@ -2066,7 +2075,13 @@ def report_exception(e):
2066 2066
         sys.stderr.write("""
2067 2067
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2068 2068
     An unexpected error has occurred.
2069
-    Please report the above lines to:
2069
+  Please try reproducing the error using
2070
+  the latest s3cmd code from the git master
2071
+  branch found at:
2072
+    https://github.com/s3tools/s3cmd
2073
+  If the error persists, please report the
2074
+  above lines (removing any private
2075
+  info as necessary) to:
2070 2076
    s3tools-bugs@lists.sourceforge.net
2071 2077
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2072 2078
 """)