mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 10:03:14 +08:00
Let the FileNotFound error be handled later in the read file process
An error will pop up by the ReadFileJob if the file cannot be found. If we also handle the File NotFound error in the checkIsValidProjectFile, then two error message will pop up in the user's screen, which is not desired. So, let only the ReadFileJob show it's error instead. CURA-7996
This commit is contained in:
parent
56b3cc5fe5
commit
7be67f43f8
@ -1941,14 +1941,7 @@ class CuraApplication(QtApplication):
|
||||
try:
|
||||
result = workspace_reader.preRead(file_path, show_dialog=False)
|
||||
return result == WorkspaceReader.PreReadResult.accepted
|
||||
except FileNotFoundError:
|
||||
result_message = Message(text = self._i18n_catalog.i18nc("@info:status Don't translate the XML tag <filename>!",
|
||||
"Failed to load <filename>{0}</filename>. File is moved or deleted.",
|
||||
file_path), lifetime = 0,
|
||||
title = self._i18n_catalog.i18nc("@info:title", "Unable to Open File"))
|
||||
result_message.show()
|
||||
return False
|
||||
except Exception:
|
||||
except:
|
||||
Logger.logException("e", "Could not check file %s", file_url)
|
||||
return False
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user