[dojo-contributors] Instrumenting deferreds to log (unhandled) rejection values

Sasha Firsov suns at firsov.net
Tue Jun 19 14:35:50 EDT 2012

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
> http://novemberborn.net
> http://twitter.com/novemberborn
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3861 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120619/a0860f37/attachment.p7s 

More information about the dojo-contributors mailing list