DEV Community

Discussion on: Sometimes, in the heat of the moment, it's forgivable to cause a runtime exception.

Collapse
 
mykezero profile image
Mykezero

Awesome! If we see the possibility of a run-time error possibly occurring, then that is the time to discover the appropriate measures to make it impossible. Whether through delegating errors to the compiler (best case) or making the error impossible through design (completely re-arranging the scenario so the error can never occur). Thanks for sharing this gem!

Collapse
 
nimmo profile image
Nimmo

Thanks for taking the time to read it. ❤️

Yep, completely agree. I've been guilty in the past of trying hard to avoid my code "falling over", but now I really want to see it fail as quickly as possible if I've actually made a mistake. And crucially, I don't want end users to suffer from my typos. 😄