Commit d20f6cb4 authored by arkohut's avatar arkohut
Browse files

fix: use Exception to handle all errors

parent 8e9e429a
......@@ -308,13 +308,8 @@ frontend_favicon = FRONTEND_BUILD_DIR / "favicon.png"
if frontend_favicon.exists():
try:
shutil.copyfile(frontend_favicon, STATIC_DIR / "favicon.png")
except PermissionError:
logging.error(f"No write permission to {STATIC_DIR / 'favicon.png'}")
except OSError as e:
if e.errno == 30: # Read-only file system
logging.error(f"Read-only file system: {STATIC_DIR / 'favicon.png'}")
else:
logging.error(f"OS error occurred: {e}")
except Exception as e:
logging.error(f"An error occurred: {e}")
else:
logging.warning(f"Frontend favicon not found at {frontend_favicon}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment