Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323915 - QVTo: uncaught runtime exceptions within a java black-box operation: invalid results vs. qvt exception?
Summary: QVTo: uncaught runtime exceptions within a java black-box operation: invalid ...
Status: RESOLVED FIXED
Alias: None
Product: QVTo
Classification: Modeling
Component: Engine (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 15:46 EDT by Nicolas Rouquette CLA
Modified: 2015-01-27 10:07 EST (History)
2 users (show)

See Also:


Attachments
Patch for JavaMethodHandlerFactory to throw QVTRuntimeException instead of returning invalid results (2.63 KB, patch)
2010-08-29 15:48 EDT, Nicolas Rouquette CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Rouquette CLA 2010-08-29 15:46:44 EDT
Currently, an uncaught runtime exception occurring within the invocation of a java black-box operation produces an invalid result.
There are two problems with this:
1) it is a lot of hassle to add checks for .oclIsInvalid() everywhere a black-box operation *may* be invoked.
2) if the black-box operation returns void, then it is impossible to detect any uncaught runtime exception that may have occurred.

Since uncaught exceptions can seriously compromise the integrity and soundness of the results produced by QVTo transformations, I propose to treat any uncaught runtime exception in java black-box operations as if it were equivalent to a QVT runtime exception.
Comment 1 Nicolas Rouquette CLA 2010-08-29 15:48:31 EDT
Created attachment 177693 [details]
Patch for JavaMethodHandlerFactory to throw QVTRuntimeException instead of returning invalid results
Comment 2 Sergey Boyko CLA 2013-11-06 02:55:53 EST
Useful improvements.  Junit test also added.

Pushed to master for M3.

Commit ID: cd736468c869a2255fe87d110576db8dfaa798d7