Possibly. What exactly do you mean by a scoping thing though? For instance, if I put the original code for doSomething() in UnitA, the Exception handling works properly.
Unfortunately, this kind of external exception catching is necessary to what we're trying to create. We're looking to create a "try" concept for TestComplete Errors. We have that part working so that you can pass a function and any TC logged errors will be deffered to warnings (and then accessed in a "catch" function) but unfortunately, it does not work with JS exceptions since they cannot currently be caught in the way I showed. They also are not handled as normal TC Errors which makes things trickier.