[
https://issues.apache.org/jira/browse/OWB-407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gerhard Petracek updated OWB-407:
---------------------------------
Attachment: OWB-407_style_1.patch
this patch includes all refactorings for resolution-exceptions (there is just
one very simple case (an UnproxyableResolutionException) i haven't moved to
InjectionExceptionUtils).
fyi:
the disadvantage of style #1 (compared to style #2) is that an ide or some
tools might detect a potential npe. we know that a call of
InjectionExceptionUtils.throw* forces a runtime exception. so there won't be a
npe in the souce-code after the method call. however, such "smart" tools won't
notice that.
example:
if (foundBean == null)
{
InjectionExceptionUtils.throwUnsatisfiedResolutionException(...);
}
//tools detect a possible npe here
---
style #2 would solve it - example:
if (foundBean == null)
{
throw InjectionExceptionUtils.unsatisfiedResolutionException(...);
}
> detailed information about exceptions
> -------------------------------------
>
> Key: OWB-407
> URL: https://issues.apache.org/jira/browse/OWB-407
> Project: OpenWebBeans
> Issue Type: Improvement
> Reporter: Gerhard Petracek
> Assignee: Gurkan Erdogdu
> Attachments: OWB-407_first_draft.patch,
> OWB-407_first_draft_(style_2).patch, OWB-407_style_1.patch
>
>
> owb should provide more information in case of invalid constellations.
> e.g. UnproxyableResolutionException shows way to few information about the
> real problem. all required information would be available (in this case in
> WebBeansUtil#checkUnproxiableApiType).
> detailed information about exceptions would help a lot during dev.-time.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.