greg-dove opened a new issue #199:
URL: https://github.com/apache/royale-compiler/issues/199
Actionscript supports multiple catch blocks, javascript does not.
try {
//something
} catch(error:ReferenceError) {
//doStuff
} catch(error:TypeError) {
//doOtherStuff
} //otherwise if it is neither of the above it will not be caught.
The above currently generates invalid javascript code (Syntax error).
It should be rewritten in js something more like:
try {
//something
} catch(error:Error) {
if (error is ReferenceError) {
//doStuff
} else (if error is TypeError) {
//doOtherStuff
} else {
//otherwise if it is neither of the above it will not be caught.
throw error;
}
}
Apparently other "Typed Language"-to-JS solutions already do this type of
thing. Needs investigation and fixes in compiler-jx.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]