[Newbies] Changing error message
Roel Wuyts
Roel.Wuyts at ulb.ac.be
Mon Aug 21 15:34:16 UTC 2006
Exception handling should be used to capture exceptional situation
that are beyond the control of your application, such as permission
errors on files etc.
It should not be used to implement a particular control flow. For
example, you can use an exception to return out of a particular
context and return control to some other context. We saw this in an
application that needed to traverse a tree of object, and whenever it
needed to backtrack it raised an error which was caught at the
decision point. So instead of properly implementing the object
traversal, exceptions were used to control the traversal.
On 21 Aug 2006, at 17:09, cdrick wrote:
> really interesting...
>
> If I remember well I've seen Stephan saying that it's not always
> good practises tu use exception handling ...
>
> what are the limits ? when to use or when not to use ...
>
> It seems appropriate to me when there is a user entry to control it
> and avoid human input error (WAValidationDecoration in seaside uses
> WAValidationNotification for the Store example for instance)
> therwise, I don't really see...
>
>
>
>
>
>
> So now you can see that if the user does something wrong we handle the
> error. Notice that the errors are raised up the stack in
> depositAmount: but
> the handler is executed in deposit method. This is very useful for
> some
> very interesting but very hard to read hacks. If someone is
> interested
> please let me know.
>
>
> I am :)
>
>
> Thanks ;)
>
> Cédrick
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
More information about the Beginners
mailing list