forked from coolaj86/walnut.js
		
	stop double printing uncaught error stacks
This commit is contained in:
		
							parent
							
								
									0492c66a8b
								
							
						
					
					
						commit
						da68c102cd
					
				| @ -149,9 +149,10 @@ module.exports.create = function () { | |||||||
|   process.on('unhandledRejection', function (err) { |   process.on('unhandledRejection', function (err) { | ||||||
|     // this should always throw
 |     // this should always throw
 | ||||||
|     // (it means somewhere we're not using bluebird by accident)
 |     // (it means somewhere we're not using bluebird by accident)
 | ||||||
|     console.error('[caught] [unhandledRejection]'); |     console.error('[caught unhandledRejection]:', err.message || ''); | ||||||
|     console.error(Object.keys(err)); |     Object.keys(err).forEach(function (key) { | ||||||
|     console.error(err); |       console.log('\t'+key+': '+err[key]); | ||||||
|  |     }); | ||||||
|     console.error(err.stack); |     console.error(err.stack); | ||||||
|   }); |   }); | ||||||
|   process.on('rejectionHandled', function (msg) { |   process.on('rejectionHandled', function (msg) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user