diff --git a/spl/std.spl b/spl/std.spl index 152633f..06a9215 100644 --- a/spl/std.spl +++ b/spl/std.spl @@ -559,6 +559,8 @@ func cache { ... | with arg-amt id body ; result } +func panic-handler { | "to be overridden"; } + def do-not-dump 0 =do-not-dump func handle-panic { | with msg trace ; program-name dup if { @@ -569,6 +571,7 @@ func handle-panic { | with msg trace ; &println trace:foreach "\nPanic message:" println " " print msg println + panic-handler def map env =map "SPL_PANIC_DUMP" env:get dup if { "Dumping because SPL_PANIC_DUMP is set." println