error handling in the open function
This commit is contained in:
@@ -90,7 +90,12 @@ class AppUI(App):
|
|||||||
def callback(path: str):
|
def callback(path: str):
|
||||||
if path == None: return
|
if path == None: return
|
||||||
|
|
||||||
self.project = Project.from_file(path)
|
try:
|
||||||
|
self.project = Project.from_file(path)
|
||||||
|
except Exception as e:
|
||||||
|
self.notify(str(e), title="Failed to open project", severity="error")
|
||||||
|
return
|
||||||
|
|
||||||
self.open_project_path = path
|
self.open_project_path = path
|
||||||
|
|
||||||
### load all the ui elements
|
### load all the ui elements
|
||||||
|
|||||||
Reference in New Issue
Block a user