Error handling and unwinding stacks in Julia

This page summarizes the projects mentioned and recommended in the original post on /r/Julia

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ResultTypes.jl

    A Result type for Julia—it's like Nullables for Exceptions

  • I'm coming to Julia with 10 years of experience running common lisp code in production. I'm used to having very robust error handling using unwind-protect, restarts, conditions etc from common lisp. I don't believe Julia has anything close to this type of error handling, I mostly see try catch and GitHub - iamed2/ResultTypes.jl: A Result type for Julia—it's like Nullables for Exceptions is there another way to deal with errors that I'm just not seeing? I need to recover gracefully without failure of the system.

  • Infiltrator.jl

    No-overhead breakpoints in Julia

  • Another small thing is in the REPL when you trigger an error in Common lisp it drops you into the debugger where you can redefine code and retry directly from the stack without unwinding the entire stack. Does Julia have functionality similar to this? Currently when I trigger an error Julia just throw the error and goes right back to the top level prompt. To resolve this issue I've tried sprinkling my code with a combination of GitHub - JuliaDebug/Infiltrator.jl + Stack Traces · The Julia Language wrapped in try catch blocks so that if an error is singled it drops into a debugger of sorts. This is ok and it works but it isn't really as good. Is there a current package that can emulate what I am trying to do? I think that the REPL workflow is good in julia but the workflow stalls out when you run into errors that don't drop into debuggers and such.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts