[Newbies] exception handling

Norbert Hartl norbert at hartl.name
Thu Sep 25 22:39:18 UTC 2008


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



More information about the Beginners mailing list