Skip to content

Instantly share code, notes, and snippets.

@sugar700
Created August 31, 2012 10:41
Show Gist options
  • Select an option

  • Save sugar700/3551347 to your computer and use it in GitHub Desktop.

Select an option

Save sugar700/3551347 to your computer and use it in GitHub Desktop.
var format = require('python-format')
var messages = require('./messages')
module.exports = function (response) {
this.response = response
this.parts = Array.prototype.slice.call(arguments, 1)
this.name = 'IrcError'
this.message = format.apply(null, [messages[response]].concat(parts))
}
module.exports.prototype = new Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment