+ catch Exception from NassiShneidermann.py in GUI

This commit is contained in:
oleting
2020-12-30 15:59:29 +01:00
parent d68976b55e
commit fc8488c3e0
2 changed files with 8 additions and 3 deletions

2
.vscode/launch.json vendored
View File

@@ -8,7 +8,7 @@
"name": "Python: Aktuelle Datei", "name": "Python: Aktuelle Datei",
"type": "python", "type": "python",
"request": "launch", "request": "launch",
"program": "debug.py", "program": "run.py",
"console": "integratedTerminal" "console": "integratedTerminal"
} }
] ]

View File

@@ -241,10 +241,11 @@ class Gui:
except InterpreterException: except InterpreterException:
logging.error( logging.error(
('||InterpreterException|| Failed to create Image with values = ' + str(values))) ('||InterpreterException|| Failed to create Image with values = ' + str(values)))
except: except Exception as e:
logging.error( logging.error(
('Failed to create Image with values = ' + str(values))) ('Failed to create Image with values = ' + str(values)))
sg.popup_error(('Failed to create an image. ')) sg.popup_error(('Failed to create an image. ' + str(e)))
except:
raise raise
elif values['-JAVA FOLDER-']: elif values['-JAVA FOLDER-']:
@@ -289,7 +290,11 @@ class Gui:
except FileNotFoundError: except FileNotFoundError:
sg.popup_error('FileNotFoundError', sg.popup_error('FileNotFoundError',
title='FileNotFoundError',) title='FileNotFoundError',)
except Exception as e:
sg.popup_cancel(str(e), title='Error')
logging.error('Try to open a .png. {e}')
except: except:
logging.error('Try to open a .png. Unknown error.')
pass pass
if event == '-JAVA FOLDER-': if event == '-JAVA FOLDER-':