Cleanest way to access / log method arguments when an error is thrown?

44 views Asked by At
Meteor.methods
  foo: (a, b) ->
    notDefined.bar()

Meteor.call('foo', 1, 2)

Right now all I'm getting in the logs and in Kadira is the error object and stack trace.

I'd like to know what a and b are (1 and 2). It would be nice to know args to methods that I didn't define myself (inside packages) as well. Currently the only general handler I have is this:

Kadira.errors.addFilter (errorType, message, error) ->

Related discussion:

https://forums.meteor.com/t/catching-and-logging-uncaught-errors-from-meteor-methods/5969

0

There are 0 answers