Change debuging to stringify messages in exception message

This commit is contained in:
Henry Oswald 2015-01-15 15:18:15 +00:00
parent 4bcc9fb5c9
commit f2bc98bc3c

View file

@ -51,7 +51,7 @@ define [
if messages.length < MESSAGE_LIMIT if messages.length < MESSAGE_LIMIT
chat.state.atEnd = true chat.state.atEnd = true
if !messages.reverse? if !messages.reverse?
Raven?.captureException(new Error("messages has no reverse property"), { messages: messages }) Raven?.captureException(new Error("messages has no reverse property #{JSON.stringify(messages)}"))
messages.reverse() messages.reverse()
prependMessages(messages) prependMessages(messages)
chat.state.nextBeforeTimestamp = chat.state.messages[0]?.timestamp chat.state.nextBeforeTimestamp = chat.state.messages[0]?.timestamp