Todd Biske wrote:
> I tend to agree with the popular opinion, although I wouldn't use the  
> terms system exception and application exception.  An exception,  
> regardless of the adjective before it, should represent something  
> abnormal (not necessarily unexpected though).  In your example, as  
> you rightly point out, there are days off during the baseball  
> season.  Therefore, a request for the score on a day when there is no  
> game should not be considered abnormal.  Interestingly, however, a  
> request for the score in January would be.

I disagree.  For uniformity of API response, out of season and day off should 
be 
the same return type.  Creating more variations for the client to deal with is 
not always a good thing.  And, I would throw an exception to signal that it is 
not proper to make that request/call at that time.  A score is a score!  If you 
can't return a score that is meaningful, then throw an exception.  Demanding 
that the application treat a score of 0 or -1 special is silly.

Gregg Wonderly

Reply via email to