Closed barbeau closed 8 years ago
@philipmw I just force-pushed a new commit into this PR. I was originally throwing SpeechletExceptions
, but just changed to throwing IOExceptions
, as I think that's a better representation of what's actually happening when the response codes aren't OK
. It's not quite as clean code-wise as throwing SpeechletExceptions
, though - more try/catches are necessary. Please take a look and let me know what you think.
Thanks - actually I was going to comment that I was not a fan of throwing SpeechletException from Oba*Client. IOException is a better choice.
I am not sure that IOException should be a checked exception, nor that we should catch it. Too much pollution with error handling for a condition that we cannot really handle. If we do not catch it, do we get a stack trace anyway?
(Typed on phone thru awesome CodeHub app.)
((I typed that ad myself.))
I debated the same thing, and went back and forth. My two cents - I think we ultimately do benefit from catching the IOException, for two reasons:
And cleanup:
@philipmw Please take a look.