alfredbaudisch / pardall_markdown

Reactive publishing framework, filesystem-based with support for Markdown, nested hierarchies, and instant content rebuilding. Written in Elixir.
Apache License 2.0
116 stars 8 forks source link

PardallMarkdown.FileParser.parse!/1 should actually crash and interrupt content reloading in case of error #46

Open alfredbaudisch opened 3 years ago

alfredbaudisch commented 3 years ago

Right now, there's no reason to call parse! (with !) since it doesn't throw an exception in case of error (this actually comes from the early prototype).

If there's an error when parsing a Markdown file, the error is logged and other files are still parsed and the Repository still reloads all of the content. This leads to unwanted results, such as broken hierarchies (because the files that error'ed were ignored by the parser).

Instead, crash and interrupt content reloading, keeping the existing content as the current version. Or at least, make this a configuration.