Can someone point me to an example of how to raise and handle exceptions in Squeak Smalltalk? My Googling came up empty.
--- Mark Volkmann
On Thu, 2008-09-25 at 17:26 -0500, Mark Volkmann wrote:
Can someone point me to an example of how to raise and handle exceptions in Squeak Smalltalk? My Googling came up empty.
[ Transcript show: 'Here it is shown...'. (Exception new messageText: 'and there it is thrown') signal ] on: Exception do: [:x| Transcript show: x messageText ]
Norbert
On Thu, Sep 25, 2008 at 05:26:22PM -0500, Mark Volkmann wrote:
Can someone point me to an example of how to raise and handle exceptions in Squeak Smalltalk? My Googling came up empty.
Look at class Exception. Here are a couple of doits to get you started. Try printing them:
[self error: 'haha'] on: Error do: [:ex | ex return: ex messageText]. ArithmeticError signal.
beginners@lists.squeakfoundation.org