more generalization
This commit is contained in:
10
main.py
10
main.py
@@ -5942,11 +5942,11 @@ def show_critical_error(error_msg):
|
||||
window.save_project(True) #TODO: If the window is the one to crash, the file can't get saved. Could be fine as the window is what was storing the data to begin with?
|
||||
|
||||
message = (
|
||||
"FLARES has encountered an unrecoverable error and needs to close.<br><br>"
|
||||
f"{APP_NAME.upper()} has encountered an unrecoverable error and needs to close.<br><br>"
|
||||
f"We are sorry for the inconvenience. An autosave was attempted to be saved to <a href='{autosave_link}'>{autosave_path}</a>, but it may not have been saved. "
|
||||
"If the file was saved, it still may not be intact, openable, or contain the correct data. Use the autosave at your discretion.<br><br>"
|
||||
"This unrecoverable error was likely due to an error with FLARES and not your data.<br>"
|
||||
f"Please raise an issue <a href='https://git.research.dezeeuw.ca/tyler/flares/issues'>here</a> and attach the error file located at <a href='{log_link}'>{log_path2}</a><br><br>"
|
||||
f"This unrecoverable error was likely due to an error with {APP_NAME.upper()} and not your data.<br>"
|
||||
f"Please raise an issue <a href='https://git.research.dezeeuw.ca/tyler/{APP_NAME}/issues'>here</a> and attach the error file located at <a href='{log_link}'>{log_path2}</a><br><br>"
|
||||
f"<pre>{error_msg}</pre>"
|
||||
)
|
||||
|
||||
@@ -5963,9 +5963,9 @@ if __name__ == "__main__":
|
||||
|
||||
# Set up application logging
|
||||
if PLATFORM_NAME == "darwin":
|
||||
log_path = os.path.join(os.path.dirname(sys.executable), "../../../flares.log")
|
||||
log_path = os.path.join(os.path.dirname(sys.executable), f"../../../{APP_NAME}.log")
|
||||
else:
|
||||
log_path = os.path.join(os.getcwd(), "flares.log")
|
||||
log_path = os.path.join(os.getcwd(), f"{APP_NAME}.log")
|
||||
|
||||
try:
|
||||
os.remove(log_path)
|
||||
|
||||
Reference in New Issue
Block a user