replyError.js 517 B

1234567891011121314151617181920212223
  1. 'use strict'
  2. var util = require('util')
  3. var RedisError = require('./redisError')
  4. var ADD_STACKTRACE = false
  5. function ReplyError (message) {
  6. var tmp = Error.stackTraceLimit
  7. Error.stackTraceLimit = 2
  8. RedisError.call(this, message, ADD_STACKTRACE)
  9. Error.captureStackTrace(this, ReplyError)
  10. Error.stackTraceLimit = tmp
  11. }
  12. util.inherits(ReplyError, RedisError)
  13. Object.defineProperty(ReplyError.prototype, 'name', {
  14. value: 'ReplyError',
  15. configurable: true,
  16. writable: true
  17. })
  18. module.exports = ReplyError