make Polar module a bit more defensive for now
This commit is contained in:
parent
697c3bb851
commit
4996756f12
1 changed files with 4 additions and 3 deletions
|
@ -140,14 +140,15 @@ class Loader:
|
||||||
)
|
)
|
||||||
h.consume()
|
h.consume()
|
||||||
|
|
||||||
if len(cmap) > 0:
|
# TODO FIXME when I add defensive error policy, support it
|
||||||
raise RuntimeError(f'Unconsumed comments: {cmap}')
|
# if len(cmap) > 0:
|
||||||
|
# raise RuntimeError(f'Unconsumed comments: {cmap}')
|
||||||
# TODO sort by date?
|
# TODO sort by date?
|
||||||
|
|
||||||
|
|
||||||
def load_items(self, metas) -> Iterator[Highlight]:
|
def load_items(self, metas) -> Iterator[Highlight]:
|
||||||
for p, meta in metas.items():
|
for p, meta in metas.items():
|
||||||
with wrap(meta) as meta:
|
with wrap(meta, throw=False) as meta:
|
||||||
yield from self.load_item(meta)
|
yield from self.load_item(meta)
|
||||||
|
|
||||||
def load(self) -> Iterator[Result]:
|
def load(self) -> Iterator[Result]:
|
||||||
|
|
Loading…
Add table
Reference in a new issue