GenericException.st
changeset 22495 3f54eb4abc4e
parent 22360 b8d77dd37262
child 22532 433d188c6654
equal deleted inserted replaced
22494:1a4b0c111a03 22495:3f54eb4abc4e
   995     "evaluate the argument, aBlock and return its value.
   995     "evaluate the argument, aBlock and return its value.
   996      If the receiver-signal is raised during evaluation, abort
   996      If the receiver-signal is raised during evaluation, abort
   997      the evaluation and return the value from exceptionValue.
   997      the evaluation and return the value from exceptionValue.
   998      This is similar to the catch & throw mechanism found in other languages"
   998      This is similar to the catch & throw mechanism found in other languages"
   999 
   999 
  1000     ^ self handle:[:ex | exceptionValue value] do:aBlock.
  1000     ^ self handle:exceptionValue do:aBlock.
  1001 
  1001 
  1002     "
  1002     "
  1003      Object messageNotUnderstoodSignal
  1003      MessageNotUnderstood
  1004 	evaluate:[ 123 size open ]
  1004         evaluate:[ 123 size open ]
  1005 	ifRaised:345
  1005         ifRaised:345
  1006     "
  1006     "
       
  1007 
       
  1008     "Modified (comment): / 12-01-2018 / 17:48:24 / stefan"
  1007 !
  1009 !
  1008 
  1010 
  1009 handle:handleBlock do:aBlock
  1011 handle:handleBlock do:aBlock
  1010     "evaluate the argument, aBlock.
  1012     "evaluate the argument, aBlock.
  1011      If the receiver-exception is raised during evaluation,
  1013      If the receiver-exception is raised during evaluation,