views:

16

answers:

1

Trying a try-catch sequence that works fine in release version, but running it in debugger causes errors to be displayed. Obviously there errors, that's why I'm using this stuff inside try, but I'm wondering if there's any way I can get debugger to stop stopping. While I don't even mind the error message, the app no longer executes properly.

I've got a this[$val] that I needs to return a null if there is no such variable inside the class.

try {
    return this[$val]+"";
} catch(error:ArgumentError) {
    // Do nothing
}
return "";

again, this works like it is supposed to, but it causes errors in debugger

any ideas for an alternative?

+2  A: 

I think you are catchin an argument error in place of the real problem of handling a null object + string error.Try Using;:

try {
    return this[$val]+"";
} catch(error:Error) {
    // Do nothing
}
return "";
loxxy
ah yes, I should have used `Error` or `ReferenceError`
Daniel