Skip to content
loading...

Errors

adam_cyclones profile image Adam Crockett github logo ・1 min read  

How do you handle errors, there are a couple of strategies:

  • don't handle errors
  • errors with warnings
  • a general error
  • an error per issue
  • no errors just defaults and failover
  • I don't get errors 🤷‍♂️

Out of each strategy which do you prefer as your overarching style of dealing with errors?

twitter logo DISCUSS (5)
Discussion
markdown guide
 

Errors must be always handled.. if for any reason the error cannot be solved in the current layer, you must throw it to the upper one.. simple as that. At some point, it needs to be fixed. Not warnings, non general errors, nothing, if there is an error you fix it or you throw it to the upper layer (only if it makes sense)

 

Just hide the errors with an Exception! Haha.

 

Why would you have an overarching, one-size-fits-all strategy? Choose the appropriate strategy for every error.

 

Because this wouldn't be a discussion if we said I use everything. 😁

 

Errors handling is the worst thing in my projects :D

Classic DEV Post from Jul 27 '19

If You Don't Know, Now You Know - GitHub Is Restricting Access For Users From Iran And A Few Other Embargoed Countries

Please help our cause against modern-day discrimination

Adam Crockett profile image
I work at ForgeRock as a Front End Engineer, I play with all sorts really. Lately WASM is my toy of interest.