[squeak-dev] The Trunk: Exceptions-ar.21.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Feb 13 23:25:44 UTC 2010

Andreas Raab uploaded a new version of Exceptions to project The Trunk:

==================== Summary ====================

Name: Exceptions-ar.21
Author: ar
Time: 13 February 2010, 3:25:29.981 pm
UUID: 19e39449-633b-944a-b43b-71bdb7ea232b
Ancestors: Exceptions-ar.20

Introduce Exception>>defaultReturnValue and Exception>>defaultResumeValue to provide default values for argument-less #resume or #return. The motivation is that catch-all handler may not be aware of specific return / resume values required by some exceptions. The protocol allows these exceptions to provide a reasonable default value for those situations.

=============== Diff against Exceptions-ar.20 ===============

Item was added:
+ ----- Method: Exception>>defaultResumeValue (in category 'defaults') -----
+ defaultResumeValue
+ 	"Answer the value that by default should be returned if the exception is resumed"
+ 	^nil!

Item was changed:
  ----- Method: Exception>>resume (in category 'handling') -----
  	"Return from the message that signaled the receiver."
+ 	self resume: self defaultResumeValue!
- 	self resume: nil!

Item was added:
+ ----- Method: Exception>>defaultReturnValue (in category 'defaults') -----
+ defaultReturnValue
+ 	"Answer the value that by default should be returned if the exception is returned"
+ 	^nil!

Item was changed:
  ----- Method: Exception>>return (in category 'handling') -----
  	"Return nil as the value of the block protected by the active exception handler."
+ 	self return: self defaultReturnValue!
- 	self return: nil!

More information about the Squeak-dev mailing list