diff --git a/lib/outcome.fz b/lib/outcome.fz index 1630d7462e..02583ab79e 100644 --- a/lib/outcome.fz +++ b/lib/outcome.fz @@ -65,9 +65,9 @@ is # public err error pre - safety: (outcome.this!!) + safety: outcome.this!! => - outcome.this ? T => panic "outcome.err called on successful outcome" + outcome.this ? T => panic "outcome.err called on successful outcome. Enable `safety` to obtain a precondition failure for debugging." | e error => e diff --git a/lib/switch.fz b/lib/switch.fz index ebd22129ed..725aa2e560 100644 --- a/lib/switch.fz +++ b/lib/switch.fz @@ -71,7 +71,7 @@ is safety: switch.this?? => switch.this ? a A => a - | B => fuzion.std.panic "switch.get called on B" + | B => fuzion.std.panic "switch.get called on B. Enable `safety` to obtain a precondition failure for debugging." # unwrap value or get default @@ -91,7 +91,7 @@ is safety: switch.this?? => switch.this ? a A => a - | B => panic "switch.val called on B" + | B => panic "switch.val called on B. Enable `safety` to obtain a precondition failure for debugging." # value of a switch or default if switch contains B