Skip to content

Exception Handler #23

Description

@jtrunick

Being able to specify an exception handler would be very useful for my case.

Activity

  1. sovelten commented on Jan 30, 2025

    @sovelten
    Contributor

    Can you specify what kind of use case you would like to support?

    The current expectation is that whenever we use api/eval or equivalent, if any uncaught exception happens within a node, this exception is going to bubble up to the caller, so you could just wrap eval within a try/catch block.

    If you want to an exception to be handled in a specific node you can also put the try/catch within the node definition.

  2. jtrunick commented on Jan 31, 2025

    @jtrunick
    ContributorAuthor

    A handler might decide to ignore the error and return a default value, or might collect multiple exceptions and throw them when finished. I'd prefer to centralize that w/o wrapping each node definition.

  3. sovelten commented on Oct 16, 2025

    @sovelten
    Contributor

    @jtrunick Can you evaluate if #51 addresses your use case? (using with-try macro).

  4. jtrunick commented on Nov 18, 2025

    @jtrunick
    ContributorAuthor

    @sovelten Sorry I missed your ask earlier. If I want to know which node in an env (specifically the keyword in the map for the node) is responsible for the exception, do you have a suggestion on how I could implement that?

    I can see somehow associating the keyword with the node before running the DAG. I see this with-try is operating on the environment for each value/node it would be nice I could catch a clojure exception with info to it's corresponding key/word. I could pass any Java exception as the cause and rethrow if i like. I think this would make for a friendlier messaging ("while evaluating node :x...").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions