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 d8f979f commit d287327
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/schema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ object JsonSchema:
def arrayFields =
items.let(_.map: (key, value) =>
key -> value.as[Property].field(requiredFields.contains(key))
).or(throw Mistake(msg"Some items were missing"))
).or(throw Panic(msg"Some items were missing"))

def objectFields =
properties.let(_.map: (key, value) =>
key -> value.as[Property].field(requiredFields.contains(key))
).or(throw Mistake(msg"Some properties were missing"))
).or(throw Panic(msg"Some properties were missing"))

def field(required: Boolean): RecordField = `type` match
case "array" =>
Expand Down

0 comments on commit d287327

Please sign in to comment.