Skip to content

Commit

Permalink
Renamed Mistake to Panic
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Feb 14, 2024
1 parent bbd7e73 commit 14ecf92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/exceptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ extends Exception(message.text.s, cause, false, !hideStack):
override def getMessage: String = component.s+": "+message.text
override def getCause: Exception | Null = cause

object Mistake:
def apply(error: Exception): Mistake =
Mistake(msg"""
object Panic:
def apply(error: Exception): Panic =
Panic(msg"""
an ${error.getClass.getName.nn.tt} exception was unexpectedly thrown;
the error was: ${Option(error.getMessage).getOrElse("[null]").nn.tt}
""")

case class Mistake(message: Message) extends java.lang.Error(message.text.s)
case class Panic(message: Message) extends java.lang.Error(message.text.s)

0 comments on commit 14ecf92

Please sign in to comment.