i dont think you could do this to all the function definitions (correct me if im wrong) but you could create a function at the Function prototype to do this.
Something like: http://mooshell.net/Uqbba/ -- Fábio Miranda Costa Solucione Sistemas Engenheiro de interfaces On Thu, Dec 3, 2009 at 10:34 AM, noiv <[email protected]> wrote: > Hi, > > I often found this pattern in my functions: > > function doSomething(params){ > try { > // Do Something > } catch (e) {catchError ("doSomething", e, params) ;} > } > > catchError() simply pretty-prints the error message to the console. > > Is there a possibility to extend all user function definitions > automatically with this try/catch pattern? Or have I missed something > even more useful? > > --noiv > >
