We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 823667c commit bc16f8cCopy full SHA for bc16f8c
pdftocio/tocparser.py
@@ -23,6 +23,11 @@ def parse_entry(entry: List, nLine: int) -> ToCEntry:
23
*entry[indent + 2:] # vpos
24
)
25
return toc_entry
26
+ except ValueError as e:
27
+ print(f"Unable to parse toc entry {entry} from line {nLine};",
28
+ f"Couldn't convert '{entry[indent + 1]}' to a page number.",
29
+ file=sys.stderr)
30
+ raise e
31
except IndexError as e:
32
print(f"Unable to parse toc entry {entry} from line {nLine};",
33
f"Need at least {indent + 2} parts but only have {len(entry)}.",
0 commit comments