lib/parser.js
function handleError (parser, type) {
  const err = new ParserError(
    'Protocol error, got ' + JSON.stringify(String.fromCharCode(type)) + ' as reply type byte',
    JSON.stringify(parser.buffer),
    parser.offset
  )
  parser.buffer = null
  parser.returnFatalError(err)
}
function handleError (parser, type) {
  const err = new ParserError(
    'Protocol error, got ' + JSON.stringify(String.fromCharCode(type)) + ' as reply type byte',
    JSON.stringify(parser.buffer),
    parser.offset
  )
  parser.buffer = null
  parser.returnFatalError(err)
}
function handleError ( parser , type ) { const err = new ParserError ( 'Protocol error, got ' + JSON . stringify ( String . fromCharCode ( type ) ) + ' as reply type byte' , JSON . stringify ( parser . buffer ) , parser . offset ) parser . buffer = null parser . returnFatalError ( err ) }
Parsing error handler, resets parser buffer
@param {JavascriptRedisParser} parser
@param {number} type
@returns {undefined}
Parsing error handler resets parser buffer