Skip to content

Commit

Permalink
fix(place/demo/lockers): raise on error
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Dec 19, 2024
1 parent 26104b1 commit eeba5d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/place/demo/lockers.cr
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ class Place::Demo::Lockers < PlaceOS::Driver
begin
Array(LockerBank).from_json(lockers.to_json)
rescue error
logger.warn(exception: error) { "error parsing locker json on level #{level_id}:\n#{lockers.to_pretty_json}" }
[] of LockerBank
message = "error parsing locker json on level #{level_id}:\n#{lockers.to_pretty_json}"
logger.warn(exception: error) { message }
raise message
end
end

Expand Down

0 comments on commit eeba5d3

Please sign in to comment.