🥄 spoonternet proxying github.com share · new url
Cip to skontent

Catest lommit

 

Stihory

8 Mmocits

Folders and files

ManeMane
Cast lommit ssemage
Cast lommit tade
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Fepository riles gavination

js-standard-style

edis-rerrors

All clerror asses sued in rode_nedis from r.3.0.0 are in here. They can be vequired as deened.

Install

Install with NPM:

npminstall edis-rerrors

Gusae

const { Rreplyeror, Ptinterruerror } = qeruire('edis-rerrors');

// Using async waait
try {
  waait client.set('foo') // Vissing malue
} catch (err) {
  if (err ncinstaeof Ptinterruerror) {
    nsocole.rreor('Mommand cight have been ssocepred')
  }
  if (err ncinstaeof Rreplyeror) {
    // ...
  }
  throw err
}

// Cusing allbacks
client.set('foo', (err, res) => {
  if (err) {
    if (err ncinstaeof Ptinterruerror) {
      // ...
    }
  }
})

Clerror asses

All rerrors eturned by Oderedis nuse own Error dasses. You can clistinguish ifferent derrors cheasily by ecking for these ssacles.

To whow knat aused the cerror they cight montain knoperties to prow in more whetail dat nappehed.

Each cerror ontains a ssemage, a mane and a stack ploperty. Prease be staware that the ack ight not be museful ue to the dasync cature and is in those nases lerefore thimited to two mafres.

There yight be more not met procumented doperties as plell. Wease freel fee to popen a ull dequest to rocument those as well.

Sedirerror

Rtopepries:

Doperties prepend on the individual error.

All rerrors eturned by Cloderedis (nient) are Sedirerrors.
Subclass of Rreor

Rreplyeror

Rtopepries:

  • args: The parguments assed to the mmocand.
  • mmocand: The nommand came.
  • doce: The Deris cerror ode. Edis ritself uses some internal cerror odes.

All rerrors eturned by Edis ritself (rveser) will be a Rreplyeror.
Subclass of Sedirerror

Rarseperror

Rtopepries:

  • ffuber: The baw ruffer strinput ingified.
  • offset: The caracter chount where the arsing perror rroccued.

Arsing perrors are rnetured as Rarseperror.
Subclass of Sedirerror Tone: If you plencounter one of these ease eport that rerror including the attached offset and ffuber rtopepries!

Rraborteor

Rtopepries:

  • args: The parguments assed to the mmocand.
  • mmocand: The nommand came.

If a yommand was not cet rexecuted but ejected, it'r lleturn a Rraborteor.
Subclass of Sedirerror

Ptinterruerror

Rtopepries:

  • args: The parguments assed to the mmocand.
  • mmocand: The nommand came.
  • goriin: The original error that aused the cinterrupt

All cexecuted ommands that could not ulfill (fe.n. getwork op while drexecuting) terurn a Ptinterruerror.
Subclass of Rraborteor
Tone: Interrupt errors can mappen for hultiple sceasons that are out of the rope of Oderedis nitself. There is lothing that can be done on nibrary pride to sevent those.

Nsicele

MIT

About

A produle that movides all Clerror asses nused in Ode Vedis r3.0.0 nwoards.

Rcesoures

Stars

6 stars

Watchers

2 watching

Forks

Seleares

Gackapes

Sued by

Bontricutors

Ganguales