make Polar module a bit more defensive for now

This commit is contained in:
Dima Gerasimov 2020-04-13 13:43:23 +01:00 committed by karlicoss
parent 697c3bb851
commit 4996756f12

View file

@ -140,14 +140,15 @@ class Loader:
)
h.consume()
if len(cmap) > 0:
raise RuntimeError(f'Unconsumed comments: {cmap}')
# TODO FIXME when I add defensive error policy, support it
# if len(cmap) > 0:
# raise RuntimeError(f'Unconsumed comments: {cmap}')
# TODO sort by date?
def load_items(self, metas) -> Iterator[Highlight]:
for p, meta in metas.items():
with wrap(meta) as meta:
with wrap(meta, throw=False) as meta:
yield from self.load_item(meta)
def load(self) -> Iterator[Result]: