ceylon/ceylon-js — Issue #32: Nested try...catch
Author: ikasiuk
Created: 2012-01-29 19:24:54+00:00
State: open
Labels: bug

Normal `try...catch` seems to work fine now. But the exceptions test from ceylon.language fails while executing this nested `try...catch`:

```
try {
try {
throw Exception(null, null);
}
catch (MyException me) {
caught:=true;
}
}
```

I'm getting this error:

```
/home/ivo/src/ceylon2/ceylon-js/build/test/node_modules/default/default.js:413
function getMe(){return $ex$}
^
ReferenceError: $ex$ is not defined
```

Here is the corresponding JS code:

```
try{
try{
throw $$$cl15.Exception($$$cl15.getNull(),$$$cl15.getNull());
}
catch($ex$){
if($$$cl15.isOfType($ex$,'MyException')){
function getMe(){return $ex$}
setCaught($$$cl15.getTrue());
}
}
}
catch($ex$){
if($$$cl15.isOfType($ex$,'ceylon.language.Exception')){}
}
```