abstract/concrete syntax for try/catch in clauses 8.2.2.13 & 8.2.2.14 lacks support for retrieving the exception caught
-
Key: QVT12-8
-
Legacy Issue Number: 15977
-
Status: closed
-
Source: NASA ( Dr. Nicolas F. Rouquette)
-
Summary:
Current abstract/concrete syntax for try/catch in clauses 8.2.2.13 & 8.2.2.14 lacks support for retrieving the exception caught.
That is, QVT1.1 is currently limited to the following style of try/catch logic:
try
{ // ... } except (Exception) { // there is no syntax to bind the actual exception caught to a variable or to retrieve it in an except expression. };
One possibility would be to introduce a variable in the catch expression (clause 8.2.2.14), e.g.:
try { // ... }except (Exception e)
{ // do something with the exception caught: e };
or:
try
{ // ... }except (Exception1 e1, Exception2 e2)
{ // do something with the exception caught: e1 or e2 };
-
Reported: QVT 1.1 — Fri, 21 Jan 2011 05:00 GMT
-
Disposition: Resolved — QVT 1.2
-
Disposition Summary:
Yes. Unuseable caught exceptions are clearly of limited utility.
There can only be one exception variable name for many exception types; what is its type? Cannot be
any of the listed types so it will have to be the common super type. Introduce a new exceptionVariable.
Of course the lower bound on the exception type should be 1. If a catch all is required then the type
can be Exception. If a finally is required then we need a wrapper or specification enhancement. -
Updated: Fri, 6 Mar 2015 20:58 GMT