Skip to content

Commit

Permalink
Merge pull request slackapi#112 from slackhq/die-on-error
Browse files Browse the repository at this point in the history
Fail harder on errors
  • Loading branch information
evansolomon committed Dec 10, 2014
2 parents 940fad0 + 5338f91 commit cf2db2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/slack.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class SlackBot extends Adapter

error: (error) =>
@robot.logger.error "Received error #{error.toString()}"
@robot.logger.error error.stack
@robot.logger.error "Exiting in 1 second"
setTimeout process.exit.bind(process, 1), 1000

loggedIn: (self, team) =>
@robot.logger.info "Logged in as #{self.name} of #{team.name}, but not yet connected"
Expand Down

0 comments on commit cf2db2f

Please sign in to comment.