Skip to content

Commit

Permalink
log errors talking to campfire
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Oct 25, 2011
1 parent 84febff commit b026d72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hubot/campfire.coffee
Expand Up @@ -6,7 +6,8 @@ class Campfire extends Robot
send: (user, strings...) ->
strings.forEach (str) =>
@bot.Room(user.room).speak str, (err, data) ->
console.log "#{user}: #{str}"
if err
console.log "campfire error: #{err}"

reply: (user, strings...) ->
strings.forEach (str) =>
Expand Down Expand Up @@ -180,6 +181,7 @@ class CampfireStreaming extends EventEmitter
request.end(body)
else
request.end()

request.on "error", (err) ->
console.log err
console.log err.stack

0 comments on commit b026d72

Please sign in to comment.