Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jan Zelenka
prasopes
Commits
95a93d1b
Commit
95a93d1b
authored
May 28, 2020
by
3Yan
Browse files
Exception handling changed
* now force-quitting is optional
parent
f9362000
Changes
2
Hide whitespace changes
Inline
Side-by-side
prasopes/__init__.py
View file @
95a93d1b
...
...
@@ -13,7 +13,7 @@ from . import zcetools_help
from
.
import
reactivitytools
__version__
=
"0.0.2
4
"
__version__
=
"0.0.2
5
"
__all__
=
[
'config'
,
'datatools'
,
'docks'
,
'drltools'
,
'drltoos_gui'
,
'filetools'
,
...
...
prasopes/__main__.py
View file @
95a93d1b
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment