 	genTypeError = (msg) ->
 		new TypeError msg
 
-	genTraceInfo = ->
+	genTraceInfo = (noTitle) ->
 		(new Error).stack
-			.replace 'Error', 'From previous event:'
+			.replace 'Error\n',
+				(if noTitle then '' else ' From previous event:\n')
 
 	# ************************** Promise Constant **************************
 

	$resolved = 1
	$pending = 2

	$promiseStack = '_pStack'

	# These are some symbols. They won't be used to store data.
	$circularChain = 'promise_circular_chain'

		return if not isObject console

		hStack = '\n'
		if isLongStackTrace and p[$promiseTrace]
			if p[$settlerTrace]
				hStack += p[$settlerTrace]
			while p
				hStack += p[$promiseTrace]
				p = p._pre

		format = (str) ->
			(if typeof __filename == 'string'
				str.replace ///.+#{__filename}.+\n?///g, ''
			else
				str
			).replace(/\n$/, '')

		console.error 'Unhandled Rejection:', (
			if reason
				if reason.stack
					format reason.stack
				else
					reason
			else
				reason
		), format(hStack)

	isLongStackTrace = false

