Closed jejacks0n closed 9 years ago
What would the API look like when we want to raise a custom exception?
We just need to move as much of the messaging to the exception classes themselves (in exceptions.rb). I'm happy to take this on too.
Done in fd7d4442d90fb1982f08efe2cc32e96c1ed69fea
There's kinda all over the place, and I've seen a pattern recently that I kinda like. Right now we usually generate the exception message in the same place where we call it, and that feels a little wrong.
I'd like to go through and remove all places where we
raise Teaspoon::CustomException, "message"
, and just pass in the things that the message might need at the time that we raise them. This should consolidate all the exception messages into exceptions.rb.At the same time, I'd like to restructure the phrasing of most of them to this sort of pattern:
"Unknown version: expected a valid version for jasmine, which allows [1.0.0, 2.0.0]."