I have a few function in my application in javascript
function( param1, param2 )
{
}
Sometimes I have caught exception and sometimes uncaught exception
My question is that: Is it possible to log out the parameters at the time of exception without explicitly writing error handling code in each function?
function(param1, param2)
{
try { /* Big try block contains all code */ } catch(e) { logger.log( param1 , param2) }
}
If there is anything like hooking in exceptions and print out the original parameter, that would be great !
argumentsis an Array-like object accessible inside functions that contains the values of the arguments passed to that function.