From 962d63eff521408814b62bb56b28f0274b194a54 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 16 Oct 2008 14:00:39 +0000 Subject: [PATCH] Improved the message to display in case of unhandled exception --- lib/core/exception.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/core/exception.py b/lib/core/exception.py index dae2513e1..566e7abc0 100644 --- a/lib/core/exception.py +++ b/lib/core/exception.py @@ -24,6 +24,9 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +import sys + +from lib.core.settings import VERSION from lib.core.settings import VERSION_STRING @@ -85,9 +88,11 @@ class sqlmapValueException(Exception): def unhandledException(): errMsg = "unhandled exception in %s, please copy " % VERSION_STRING - errMsg += "this and the following traceback and send us by email. " - errMsg += "We will fix it as soon as possible:" - + errMsg += "the command line and the following text and send us " + errMsg += "by email. We will fix it as soon as possible:\n" + errMsg += "sqlmap version: %s\n" % VERSION + errMsg += "Python version: %s\n" % sys.version.split()[0] + errMsg += "Operating system: %s" % sys.platform return errMsg