You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Ivo Maixner (Created) (JIRA)" <ji...@apache.org> on 2012/04/17 09:42:33 UTC
[jira] [Created] (DELTASPIKE-165) Exception handlers: support
handling unexpected exceptions
Exception handlers: support handling unexpected exceptions
----------------------------------------------------------
Key: DELTASPIKE-165
URL: https://issues.apache.org/jira/browse/DELTASPIKE-165
Project: DeltaSpike
Issue Type: Improvement
Components: ExceptionControl-Module
Reporter: Ivo Maixner
Assignee: Gerhard Petracek
Provide a way to handle exceptions not handled by any other handler.
Currently, a handler like this:
public void unexpectedException(@Handles CaughtException<Throwable> event) {
if (!event.isMarkedHandled()) {
log.error("Unexpected exception", event.getException());
messages.error(new BundleKey(MESSAGE_BUNDLE, "unexpected.exception"));
}
}
gets in the way when there are other handlers which respond to non-root-cause exceptions.
Some ideas:
- an UnhandledException event fired as a last chance to handle it before re-throwing it as unhandled
- a third traversal type - after BREADTH_FIRST and DEPTH_FIRST
See https://community.jboss.org/thread/198408
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DELTASPIKE-165) Exception handlers: support
handling unexpected exceptions
Posted by "Gerhard Petracek (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255488#comment-13255488 ]
Gerhard Petracek commented on DELTASPIKE-165:
---------------------------------------------
please add new use-cases to https://cwiki.apache.org/confluence/display/DeltaSpike/Exception+Control+Drafts
> Exception handlers: support handling unexpected exceptions
> ----------------------------------------------------------
>
> Key: DELTASPIKE-165
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-165
> Project: DeltaSpike
> Issue Type: Improvement
> Components: ExceptionControl-Module
> Reporter: Ivo Maixner
> Assignee: Gerhard Petracek
>
> Provide a way to handle exceptions not handled by any other handler.
> Currently, a handler like this:
> public void unexpectedException(@Handles CaughtException<Throwable> event) {
> if (!event.isMarkedHandled()) {
> log.error("Unexpected exception", event.getException());
> messages.error(new BundleKey(MESSAGE_BUNDLE, "unexpected.exception"));
> }
> }
> gets in the way when there are other handlers which respond to non-root-cause exceptions.
> Some ideas:
> - an UnhandledException event fired as a last chance to handle it before re-throwing it as unhandled
> - a third traversal type - after BREADTH_FIRST and DEPTH_FIRST
> See https://community.jboss.org/thread/198408
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DELTASPIKE-165) Exception handlers: support
handling unexpected exceptions
Posted by "Jason Porter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482561#comment-13482561 ]
Jason Porter commented on DELTASPIKE-165:
-----------------------------------------
I've been going back and forth on this one in my head because the original event fired (ExceptionToCatchEvent) has a boolean flag indicating if the exception was actually handled (isHandled). That should work fine if you're sending the exception to catch yourself and any other integrations should be able to do what is needed (for example JSF may want to bomb out if you're in development mode so you can actually see what's going on). Will that work Ivo, or would you still prefer the new event?
> Exception handlers: support handling unexpected exceptions
> ----------------------------------------------------------
>
> Key: DELTASPIKE-165
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-165
> Project: DeltaSpike
> Issue Type: Improvement
> Components: ExceptionControl-Module
> Reporter: Ivo Maixner
> Assignee: Jason Porter
>
> Provide a way to handle exceptions not handled by any other handler.
> Currently, a handler like this:
> public void unexpectedException(@Handles CaughtException<Throwable> event) {
> if (!event.isMarkedHandled()) {
> log.error("Unexpected exception", event.getException());
> messages.error(new BundleKey(MESSAGE_BUNDLE, "unexpected.exception"));
> }
> }
> gets in the way when there are other handlers which respond to non-root-cause exceptions.
> Some ideas:
> - an UnhandledException event fired as a last chance to handle it before re-throwing it as unhandled
> - a third traversal type - after BREADTH_FIRST and DEPTH_FIRST
> See https://community.jboss.org/thread/198408
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DELTASPIKE-165) Exception handlers: support
handling unexpected exceptions
Posted by "Jason Porter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476199#comment-13476199 ]
Jason Porter commented on DELTASPIKE-165:
-----------------------------------------
Seems to me like the event is probably the cleanest and less invasive approach.
> Exception handlers: support handling unexpected exceptions
> ----------------------------------------------------------
>
> Key: DELTASPIKE-165
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-165
> Project: DeltaSpike
> Issue Type: Improvement
> Components: ExceptionControl-Module
> Reporter: Ivo Maixner
> Assignee: Jason Porter
>
> Provide a way to handle exceptions not handled by any other handler.
> Currently, a handler like this:
> public void unexpectedException(@Handles CaughtException<Throwable> event) {
> if (!event.isMarkedHandled()) {
> log.error("Unexpected exception", event.getException());
> messages.error(new BundleKey(MESSAGE_BUNDLE, "unexpected.exception"));
> }
> }
> gets in the way when there are other handlers which respond to non-root-cause exceptions.
> Some ideas:
> - an UnhandledException event fired as a last chance to handle it before re-throwing it as unhandled
> - a third traversal type - after BREADTH_FIRST and DEPTH_FIRST
> See https://community.jboss.org/thread/198408
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (DELTASPIKE-165) Exception handlers: support
handling unexpected exceptions
Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Struberg reassigned DELTASPIKE-165:
----------------------------------------
Assignee: Mark Struberg (was: Gerhard Petracek)
> Exception handlers: support handling unexpected exceptions
> ----------------------------------------------------------
>
> Key: DELTASPIKE-165
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-165
> Project: DeltaSpike
> Issue Type: Improvement
> Components: ExceptionControl-Module
> Reporter: Ivo Maixner
> Assignee: Mark Struberg
>
> Provide a way to handle exceptions not handled by any other handler.
> Currently, a handler like this:
> public void unexpectedException(@Handles CaughtException<Throwable> event) {
> if (!event.isMarkedHandled()) {
> log.error("Unexpected exception", event.getException());
> messages.error(new BundleKey(MESSAGE_BUNDLE, "unexpected.exception"));
> }
> }
> gets in the way when there are other handlers which respond to non-root-cause exceptions.
> Some ideas:
> - an UnhandledException event fired as a last chance to handle it before re-throwing it as unhandled
> - a third traversal type - after BREADTH_FIRST and DEPTH_FIRST
> See https://community.jboss.org/thread/198408
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (DELTASPIKE-165) Exception handlers: support
handling unexpected exceptions
Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Struberg reassigned DELTASPIKE-165:
----------------------------------------
Assignee: Jason Porter (was: Mark Struberg)
Jason, is this still valid and needed?
> Exception handlers: support handling unexpected exceptions
> ----------------------------------------------------------
>
> Key: DELTASPIKE-165
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-165
> Project: DeltaSpike
> Issue Type: Improvement
> Components: ExceptionControl-Module
> Reporter: Ivo Maixner
> Assignee: Jason Porter
>
> Provide a way to handle exceptions not handled by any other handler.
> Currently, a handler like this:
> public void unexpectedException(@Handles CaughtException<Throwable> event) {
> if (!event.isMarkedHandled()) {
> log.error("Unexpected exception", event.getException());
> messages.error(new BundleKey(MESSAGE_BUNDLE, "unexpected.exception"));
> }
> }
> gets in the way when there are other handlers which respond to non-root-cause exceptions.
> Some ideas:
> - an UnhandledException event fired as a last chance to handle it before re-throwing it as unhandled
> - a third traversal type - after BREADTH_FIRST and DEPTH_FIRST
> See https://community.jboss.org/thread/198408
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira