Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323915

Summary: QVTo: uncaught runtime exceptions within a java black-box operation: invalid results vs. qvt exception?
Product: [Modeling] QVTo Reporter: Nicolas Rouquette <nicolas.f.rouquette>
Component: EngineAssignee: Project Inbox <mmt-qvt.operational-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christopher.gerking, serg.boyko2011
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch for JavaMethodHandlerFactory to throw QVTRuntimeException instead of returning invalid results none

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