Fork me on GitHub
#babashka
<
2023-07-10
>
greg15:07:45

Is a global exception handler supported in babashka? Something like:

(Thread/setDefaultUncaughtExceptionHandler
  (reify Thread$UncaughtExceptionHandler
    (uncaughtException [_ thread ex]
      (log/error ex "Uncaught exception on" (.getName thread)))))

borkdude16:07:59

Technically this code works, but global exceptions are handled by babashka itself already, so this is why it may not work as desired

borkdude16:07:22

but perhaps that can be improved, feel free to log an issue