To raise or not to raise exceptions, and the art of designing return values
alfredomotta.substack.com
Each time we call a function that's meant to perform some operation that could succeed or fail we are always left with the same dilemma. What should be the return value? Should I return nil if a failure happened? Or I should throw an exception? What does
To raise or not to raise exceptions, and the art of designing return values
To raise or not to raise exceptions, and the…
To raise or not to raise exceptions, and the art of designing return values
Each time we call a function that's meant to perform some operation that could succeed or fail we are always left with the same dilemma. What should be the return value? Should I return nil if a failure happened? Or I should throw an exception? What does