Slight change to error message.

This commit is contained in:
Bruce Marriner 2016-04-25 15:33:40 -05:00
parent e2e03c3078
commit a258ec3011

View file

@ -288,11 +288,12 @@ func (s *Session) event(messageType int, message []byte) {
// Attempt to unmarshal our event. // Attempt to unmarshal our event.
// If there is an error we should handle the event itself. // If there is an error we should handle the event itself.
if err = json.Unmarshal(e.RawData, i); err != nil { if err = json.Unmarshal(e.RawData, i); err != nil {
log.Println(fmt.Sprintf("Unable to unmarshal event %s data: %s", e.Type, err)) log.Printf("error unmarshalling %s event, %s\n", e.Type, err)
// Ready events must fire, even if they are empty. // Ready events must fire, even if they are empty.
if e.Type != "READY" { if e.Type != "READY" {
i = nil i = nil
} }
} }
} else { } else {
log.Println("Unknown event.") log.Println("Unknown event.")