more generalization

This commit is contained in:
2026-03-13 13:40:49 -07:00
parent f794b98d18
commit 8c207b17ad

10
main.py
View File

@@ -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? 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 = ( 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. " 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>" "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"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/flares/issues'>here</a> and attach the error file located at <a href='{log_link}'>{log_path2}</a><br><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>" f"<pre>{error_msg}</pre>"
) )
@@ -5963,9 +5963,9 @@ if __name__ == "__main__":
# Set up application logging # Set up application logging
if PLATFORM_NAME == "darwin": 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: else:
log_path = os.path.join(os.getcwd(), "flares.log") log_path = os.path.join(os.getcwd(), f"{APP_NAME}.log")
try: try:
os.remove(log_path) os.remove(log_path)