Hacker News new | ask | show | jobs
by jmnicolas 2497 days ago
Now we're talking. It would probably take 20+ lines of C# to do the same thing.

How do you manage errors? What happens if Questionnaire.xlsx or Sheet1 doesn't exist ?

1 comments

> How do you manage errors?

It becomes unwieldy like every other language.

> What happens if Questionnaire.xlsx or Sheet1 doesn't exist ?

Runtime exception.

I've seen too much Clojure code (and this goes for every language where error handling is optional - Hi Javascript!) just skip error handling and focus on "happy path".

And as demonised as Java's checked exceptions are, they at least forced error handling to be thought of.

Or you could use: https://github.com/adambard/failjure

Ya'll underestimate the power of a programming language to create a programming language. Just replace the arrow with `ok->>`