Comment

Comment by time0ut

Maybe I am missing something, but how else would I test various exception handling paths?

There is a whole world of errors that can occur during IO. What happens if I get a 500 from that web service call? How does my code handle a timeout? What if the file isn't found?

It is often only possible to simulate these scenarios using a mock or similar. These are also code paths you really want to understand.

parent time0ut 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton