RuntimeError is for "unexpected errors". When the argument has a
wrong value, ValueError is the standard exception to use.
elif arg == "--unshare-ipc":
unshare_ipc = True
elif arg.startswith("-"):
- raise RuntimeError(f"Unrecognized option {arg}")
+ raise ValueError(f"Unrecognized option {arg}")
else:
argv.append(arg)
break
# Make sure all destination paths are absolute.
for fsop in fsops:
if fsop.dst[0] != "/":
- raise RuntimeError(f"{fsop.dst} is not an absolute path")
+ raise ValueError(f"{fsop.dst} is not an absolute path")
fsops = FSOperation.optimize(fsops)