Skip to content

Commit

Permalink
Merge pull request #127 from raboof/errorMessage
Browse files Browse the repository at this point in the history
Include page path in error message when writing fails
  • Loading branch information
2m authored Jun 15, 2017
2 parents 7fc76a1 + 77bdff4 commit 6258f17
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ class ParadoxProcessor(reader: Reader = new Reader, writer: Writer = new Writer)
private val page = loc.tree.label

val getTitle = page.title
val getContent = writer.writeContent(page.markdown, context)
val getContent =
try writer.writeContent(page.markdown, context)
catch {
case e: Throwable => throw new RuntimeException(s"Error writing content for page ${page.path}: ${e.getMessage}", e)
}

lazy val getBase = page.base
lazy val getHome = link(Some(loc.root))
Expand Down

0 comments on commit 6258f17

Please sign in to comment.