Bug 496183 - Support re-raising
Summary: Support re-raising
Status: NEW
Alias: None
Product: QVTo
Classification: Modeling
Component: Engine (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows NT
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-15 10:00 EDT by Ed Willink CLA
Modified: 2016-06-15 10:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2016-06-15 10:00:40 EDT
http://issues.omg.org/browse/QVT14-42: 

The exception raising syntax is a bit of a mess, cherry-picking special syntaxes and thereby inhibiting general functionality such as raising a computed exception. It is therefore not possible to re-raise an exception.

--

Possible solution. Replace

<raise_exp> ::= 'raise' <scoped_identifier> ('(' <arg_list>? ')')?
'raise' <STRING>

by

<raise_exp> ::= 'raise' <expression>

where <expression> should be Exception-typed allowing "raise e" to re-raise.

The legacy syntax is subsumed and can be recognised as a StringLiteral=>StringExpression syntax, exception-typed-OperationCallExp=>normal syntax.

------

If anyone's working in this area, they might like to prototype the possible solution.