Skip to content

Commit

Permalink
Make stack traces optional
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Sep 20, 2024
1 parent ff2034f commit 4fd1ff9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/exceptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package xylophone
import fulminate.*
import gossamer.*

case class XmlParseError(line: Int, column: Int)
case class XmlParseError(line: Int, column: Int)(using Diagnostics)
extends Error(m"the XML source could not be parsed at line $line, column $column")

case class XmlReadError() extends Error(m"could not read value")
case class XmlReadError()(using Diagnostics) extends Error(m"could not read value")

case class XmlAccessError(index: Int, path: XmlPath)
case class XmlAccessError(index: Int, path: XmlPath)(using Diagnostics)
extends Error(m"""could not access ${if index == 0 then t"any nodes" else t"node $index"} at path
${Xml.pathString(path)}""")
2 changes: 2 additions & 0 deletions src/core/xmlparser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import contingency.*
import gossamer.*
import spectacular.*

import exceptionDiagnostics.empty

object XmlInterpolation:

enum XmlInput:
Expand Down

0 comments on commit 4fd1ff9

Please sign in to comment.