X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fexception_handler.py;h=9e54fa69825bb27e971f2c2875a69cc05f8c038f;hb=e47f203a5648786cd782d921880a77a395570059;hp=1dc3405c6c75414232ce34523d1c6d942c8c65a4;hpb=885a328caa001ff223ac1e7f27bb6b6906228244;p=bertos.git diff --git a/wizard/exception_handler.py b/wizard/exception_handler.py index 1dc3405c..9e54fa69 100644 --- a/wizard/exception_handler.py +++ b/wizard/exception_handler.py @@ -42,6 +42,8 @@ from PyQt4.QtGui import * def _excepthook(exc_type, exc_value, exc_traceback): project_dir = QApplication.instance().project.info("PROJECT_PATH") + if not project_dir: + project_dir = os.getcwd() file_name = os.path.join(project_dir, "wizard_error.log") if os.path.exists(file_name): content = open(file_name, "r").read() @@ -55,6 +57,7 @@ def _excepthook(exc_type, exc_value, exc_traceback): f.write(">"*80 + "\n") f.write(content) f.close() + print>>sys.stderr, message QMessageBox.critical( None, "Exception occurred",