Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better exception handling #87

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

emil-bar
Copy link
Contributor

@emil-bar emil-bar commented Jan 14, 2025

Closes #59

@emil-bar emil-bar force-pushed the throw-unchecked-exception-wrapper-instead-of-ee branch from 8dc65a4 to e5f2092 Compare January 14, 2025 16:32
* unwrap JoxScopeExecutionException in flows
* add `unwrapAndThrow` utility method
* updated java docs and readme
@emil-bar emil-bar force-pushed the throw-unchecked-exception-wrapper-instead-of-ee branch from e5f2092 to 8e29147 Compare January 15, 2025 10:48
@emil-bar emil-bar changed the title WIP exception handling Better exception handling Jan 15, 2025
@emil-bar emil-bar marked this pull request as ready for review January 15, 2025 10:48
@adamw adamw merged commit 5d5dbfc into main Jan 22, 2025
2 checks passed
@adamw adamw deleted the throw-unchecked-exception-wrapper-instead-of-ee branch January 22, 2025 15:28
@@ -1678,6 +1676,10 @@ public void runToFile(Path path) throws Exception {
}
});
close(channel, null);
} catch (JoxScopeExecutionException e) {
Exception cause = (Exception) e.getCause();
close(channel, cause);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I merged too fast ;) shouldn't we not-unwrap here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I might have missed that bit, let me open another PR to revert it as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: #89

@adamw
Copy link
Member

adamw commented Jan 22, 2025

(sorry, comment for the wrong PR earlier)

thanks for the work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider not throwing ExecutionException in structured scopes
2 participants