 		return if not isObject console
 
 		hStack = '\n'
-		if isLongStackTrace and p[$promiseStack]
+		if isLongStackTrace and p[$promiseTrace]
+			if p[$settlerTrace]
+				hStack += p[$settlerTrace]
 			while p
-				hStack += p[$promiseStack]
+				hStack += p[$promiseTrace]
 				p = p._pre
 
 		format = (str) ->
-			if typeof __filename == 'string'
-				str.replace ///.+#{__filename}.+\n///g, ''
+			(if typeof __filename == 'string'
+				str.replace ///.+#{__filename}.+\n?///g, ''
 			else
 				str
-
-		stack = if reason
-			if reason.stack
-				format reason.stack
+			).replace(/\n$/, '')
+
+		console.error 'Unhandled Rejection:', (
+			if reason
+				if reason.stack
+					format reason.stack
+				else
+					reason
 			else
 				reason
-		else
-			reason
-
-		console.error 'Unhandled Rejection:', stack, format(hStack)
+		), format(hStack)
 
 	isLongStackTrace = false
 

	 * @return {Function} `(value) -> undefined` A resolve or reject function.
	###
	genSettler = (self, state) -> (value) ->
		settlePromise self, state, value, state == $rejected

	###*
	 * Link the promise1 to the promise2.

	$resolved = 1
	$pending = 2

	$promiseTrace = '_pStack'
	$settlerTrace = '_sStack'

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