[BACKEND] More explicit error message for PermissionError
This commit is contained in:
parent
3c87dc9f8e
commit
a9fa2a5bf6
1 changed files with 6 additions and 0 deletions
|
|
@ -221,6 +221,12 @@ class Logger:
|
|||
# Log validation exceptions as-is
|
||||
if isinstance(exception, ValidationException):
|
||||
logger.error(str(exception))
|
||||
# Log permission errors explicitly
|
||||
elif isinstance(exception, PermissionError):
|
||||
logger.error("A permission error occurred:\n%s", str(exception))
|
||||
logger.error(
|
||||
"The user running ytdl-sub must have permission to this file/directory."
|
||||
)
|
||||
# For other uncaught errors, log as bug:
|
||||
else:
|
||||
logger.exception("An uncaught error occurred:")
|
||||
|
|
|
|||
Loading…
Reference in a new issue