Skip to content

Commit

Permalink
refactor(engine): correct error message for properties
Browse files Browse the repository at this point in the history
  • Loading branch information
saig0 committed Aug 20, 2021
1 parent 8905b55 commit e906338
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ class FeelInterpreter {
case e =>
error(
v,
s"expected one of the date properies {year, month, day} but fount '$e'")
s"expected one of the properties {year, month, day, weekday} but fount '$e'")
}
case ValTime(time) =>
key match {
Expand All @@ -934,7 +934,7 @@ class FeelInterpreter {
case e =>
error(
v,
s"expected one of the time properies {hour, minute, second, time offset, timezone} but fount '$e'")
s"expected one of the properties {hour, minute, second, time offset, timezone} but fount '$e'")
}
case ValLocalTime(time) =>
key match {
Expand All @@ -946,7 +946,7 @@ class FeelInterpreter {
case e =>
error(
v,
s"expected one of the (local) time properies {hour, minute, second} but fount '$e'")
s"expected one of the time properties {hour, minute, second, time offset, timezone} but fount '$e'")
}
case ValDateTime(dateTime) =>
key match {
Expand All @@ -966,7 +966,7 @@ class FeelInterpreter {
case e =>
error(
v,
s"expected one of the date-time properies {year, month, day, hour, minute, second, time offset, timezone} but fount '$e'")
s"expected one of the properties {year, month, day, weekday, hour, minute, second, time offset, timezone} but fount '$e'")
}
case ValLocalDateTime(dateTime) =>
key match {
Expand All @@ -982,7 +982,7 @@ class FeelInterpreter {
case e =>
error(
v,
s"expected one of the (local) date-time properies {year, month, day, hour, minute, second} but fount '$e'")
s"expected one of the properties {year, month, day, weekday, hour, minute, second, time offset, timezone} but fount '$e'")
}
case ValYearMonthDuration(duration) =>
key match {
Expand All @@ -991,7 +991,7 @@ class FeelInterpreter {
case e =>
error(
v,
s"expected one of the duration properies {years, months} but fount '$e'")
s"expected one of the duration properties {years, months} but fount '$e'")
}
case ValDayTimeDuration(duration) =>
key match {
Expand All @@ -1002,10 +1002,10 @@ class FeelInterpreter {
case e =>
error(
v,
s"expected one of the duration properies {days, hours, minutes, seconds} but fount '$e'")
s"expected one of the duration properties {days, hours, minutes, seconds} but fount '$e'")
}
case e =>
error(e, s"expected Context or List of Contextes but found '$e'")
error(e, s"expected Context or List of Contexts but found '$e'")
}

private def hasTimeZone(dateTime: DateTime) =
Expand Down

0 comments on commit e906338

Please # to comment.