Mercurial > psgxs
comparison psgxs.js @ 17:ec7cea92fe8a
Show stack on unhandled error.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 19 Oct 2010 18:50:02 +0200 |
parents | 9a6b8b3357c6 |
children | 75625771e410 |
comparison
equal
deleted
inserted
replaced
16:95fc43d1bd54 | 17:ec7cea92fe8a |
---|---|
43 else | 43 else |
44 console.log(str); | 44 console.log(str); |
45 }; | 45 }; |
46 | 46 |
47 process.addListener('uncaughtException', function (err) { | 47 process.addListener('uncaughtException', function (err) { |
48 console.log('\033[41;1mUncaught exception, this should never happen: ' + err + '.\033[0m'); | 48 console.log('\033[41;1mUncaught exception (' + err + '), this should never happen:\033[0m\n' + err.stack); |
49 }); | 49 }); |
50 | 50 |
51 if (typeof xmpp.StanzaBuilder.cnode != 'function' || typeof xmpp.StanzaBuilder.prototype.cnode != 'function') { | 51 if (typeof xmpp.StanzaBuilder.cnode != 'function' || typeof xmpp.StanzaBuilder.prototype.cnode != 'function') { |
52 xmpp.StanzaBuilder.prototype.cnode = function (stanza) | 52 xmpp.StanzaBuilder.prototype.cnode = function (stanza) |
53 { | 53 { |