Community
Participate
Working Groups
If an invoked Java Method trips over for instance if (genPackage.eIsProxy()) { throw new IllegalStateException("Unresolved proxy : '" + ((InternalEObject)genPackage).eProxyURI()); } no ISE appears in the console stack trace because EvaluationVisitorImpl absorbs the exception when returning getInvalid(). This is an Eclipse OCL 'feature'. Please raise a Bug if you are able to exploit an ability to override getInvalid(Exception) to throw the exception rather than a compatibility default of getInvalid(). The new pivot evaluator has stateful invalid values that can carry messages, exceptions and environments. This problem occurs even for an EvaluationHaltedException since it too is converted to an InvocationTargetException, so there is no workaround. I think the InvocationTargetException should be unwrapped.
Ed, I recall there was another bug on this, but I can't find it back. This problem is "known" as I remember investigating that a little ... but It has neither been fixed or worked around for now. We'll raise a bug against OCL if necessary when we come back to investigating it :).
(In reply to comment #1) > I recall there was another bug on this, but I can't find it back. I thought so too and found it eventually. It's similar but not the same as bug 348478, which isn't an OCL problem.
(In reply to comment #2) > (In reply to comment #1) > > I recall there was another bug on this, but I can't find it back. > > I thought so too and found it eventually. It's similar but not the same as bug > 348478, which isn't an OCL problem. Yes, not really the same. The bug I was looking for was an exact duplicate of this, but it may not have been raised as a bug ... maybe a discussion on bugzilla or mail. Anyways, thanks for reporting it, that'll prevent me from losing track of that limitation once again :p.
Exceptions thrown from within java services are now properly logged in the console.