Exceptions swallowed during evaluation [message #631670] |
Fri, 08 October 2010 12:23 |
|
Hi,
I'm having hard times to debug some OCL expressions in combination of a custom lazy extent map. Most exceptions are neither propagated nor logged in AbstractEvaluationVisitor:
public Object visitExpression(OCLExpression<C> expression) {
try {
return expression.accept(getVisitor());
} catch (EvaluationHaltedException e) {
// evaluation stopped on demand, propagate further
throw e;
} catch (RuntimeException e) {
String msg = e.getLocalizedMessage();
if (msg == null) {
msg = OCLMessages.no_message;
}
OCLPlugin.log(Diagnostic.ERROR, OCLStatusCodes.IGNORED_EXCEPTION_WARNING,
OCLMessages.bind(OCLMessages.EvaluationFailed_ERROR_, msg), e);
// failure to evaluate results in invalid
return getInvalid();
}
}
Note that OCLStatusCodes.IGNORED_EXCEPTION_WARNING even suppresses log output about the exception.
Shouldn't the exception be stored somewhere? E.g. in the result, the visitor, the evaluation environment or where ever. Just somewhere that I can access it after the evaluation has failed.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03142 seconds