try.catch
Simple performant try-catch wrapper.
This utility is used in place of regular try/catch
blocks using a clean functional syntax. Execution is fully synchronous; this does not work with async methods
Instead of this
try // do somethingcatch err // handle errorsfinally // finally do something
Do this
var Try = ; ;
It can also be used like this:
{ return this + x * y;} var result = // pass context and arguments to function // chain catch blocks; console; // return value of function if anyconsole; // error thrown if any
See tests for full spec
Tests
Run tests using npm test