Status: New
Owner: ----

New issue 3019 by [email protected]: Need a better way to stringify functions in error messages
http://code.google.com/p/v8/issues/detail?id=3019

Currently, NoSideEffectToString (in /src/messages.js) simply calls FunctionToString when it encounter a function object, which tries to print its source.

This is rarely useful in practice and often generates very long and noisy error messages. (e.g. TypeError: Object function(){ /* ... 5000 characters function source ... */ } has no method 'someMethod') This makes the error message very hard to read, and it's especially problematic for users who collect their crashes in the browser (with window.onerror, for example) and sends it back to their server or a third-party collection service (disclosure: we are building one at caliper.io).

There probably needs to be a better long-term strategy, but I suppose using the name property on the function (when available) would be a good start? (It's guaranteed side-effect free, unlike custom toString functions.)

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to