How can I override or bubble up javascript try/catch blocks

javascript

Solution

Nope. If an Exception is thrown and catched, it won't bubble up again (unless the `catch` blocks rethrows the exception).

Problem

I have an application that uses a few external libraries. These libraries use try/catch blocks to deal with errors. Rather then editing the libraries and removing the try/catch blocks is there a way to force them to bubble up to a function I control so that I can post them to my server? here is an example ``` 'parseBindingsString': function(bindingsString, bindingContext, node, options) { try { var bindingFunction = createBindingsStringEvaluatorViaCache(bindingsString, this.bindingCache, options); return bindingFunction(bindingContext, node); } catch (ex) { ex.message = "Unable to parse bindings.\nBindings value: " + bindingsString + "\nMessage: " + ex.message; throw ex; } } ```

Original source