Commit 95a93d1b authored by 3Yan's avatar 3Yan

Exception handling changed

* now force-quitting is optional
parent f9362000
......@@ -13,7 +13,7 @@ from . import zcetools_help
from . import reactivitytools
__version__ = "0.0.24"
__version__ = "0.0.25"
__all__ = ['config', 'datatools', 'docks', 'drltools', 'drltoos_gui', 'filetools',
......
......@@ -49,9 +49,12 @@ def show_exception_and_exit(exc_type, exc_value, tb):
return
import traceback
traceback.print_exception(exc_type, exc_value, tb)
errmsg = "\n".join(traceback.format_exception(exc_type, exc_value, tb))
QtWidgets.QMessageBox.critical(None, "Exception!", errmsg)
sys.exit(-1)
errmsg = "\n".join(traceback.format_exception(exc_type, exc_value, tb))\
+ ("\n The program might misbehave, do you want to continue?")
outmsg = QtWidgets.QMessageBox.critical(None, "Exception!", errmsg,
QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
if outmsg != QtWidgets.QMessageBox.Yes:
sys.exit(-1)
def load_file(parent, augCanvas, update, settings, loadthread, filename=None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment