[dojo-contributors] Instrumenting deferreds to log (unhandled) rejection values
mark at novemberborn.net
Wed Jun 20 18:52:06 EDT 2012
On 19 Jun 2012, at 19:35, Sasha Firsov wrote:
> This exception handling log method is good enough. I like to remind generic issue with missing development pattern which has been raised early in dojo-interest.
>> While been developing in C++ I found ASSERT capability quite handy in sources. And missing it very much in JS.
>> For those who not familiar with concept, ASSERT( condition, message,...) will render message with stack trace and a breakpoint if condition evaluated to false, In release build it is excluded from sources and does not leave any performance footpring.
>> Also there are several log levels which are eliminated from release build.
> TRACE and ASSERT (with combination of both) are good habit in C++ development. Same would be quite beneficial in DTK.
> Looks some support we could gain from build levels and compiler which capable of removing empty function calls.
> Backing to Deferred logs, TRACE(err) is the perfect use case of release build logs removal.
> On 2012-06-19 11:13, Mark Wubben wrote:
>> On 17 Jun 2012, at 18:46, Mark Wubben wrote:
>>> See<https://github.com/novemberborn/dojo/compare/instrument-deferreds> for instrumentation that runs by default. It also tracks stack traces. Haven't quite settled on what to log precisely, but this should be a good start. A brief look in Firefox though shows the stack traces to be just horrible. Any ideas?
>>> I've tried to disable the automatic instrumenting in the various build profiles, see<https://github.com/novemberborn/dojo-util/compare/instrument-deferreds>.
>>> Before I merge this, any feedback on the instrumentation or how it's all hooked up?
>> I forgot to share the example file, see<https://gist.github.com/e9d65c058dfb12f38391>.
>> Without further feedback I'll merge this into trunk tomorrow.
>> Mark Wubben
>> dojo-contributors mailing list
>> dojo-contributors at mail.dojotoolkit.org
> dojo-contributors mailing list
> dojo-contributors at mail.dojotoolkit.org
More information about the dojo-contributors