1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-12 09:34:50 +02:00

flip link_archive exception throw order so real exception is easier to read at the bottom

This commit is contained in:
Nick Sweeting
2024-09-25 00:39:49 -07:00
parent 6742888278
commit ee5bec6a10

View File

@@ -181,10 +181,10 @@ def archive_link(link: Link, overwrite: bool=False, methods: Optional[Iterable[s
#f.write(f"\n> {command}; ts={ts} version={config['VERSION']} docker={config['IN_DOCKER']} is_tty={config['IS_TTY']}\n")
# print(f' ERROR: {method_name} {e.__class__.__name__}: {e} {getattr(e, "hints", "")}', ts, link.url, command)
raise Exception('Exception in archive_methods.save_{}(Link(url={}))'.format(
raise e from Exception('Exception in archive_methods.save_{}(Link(url={}))'.format(
method_name,
link.url,
)) from e
))
# print(' ', stats)