The Trunk: Collections-ar.333.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-ar.333.mcz

commits-2
Andreas Raab uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ar.333.mcz

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

Name: Collections-ar.333
Author: ar
Time: 9 March 2010, 10:09:37.168 pm
UUID: ce2fbc3d-5a3e-3249-b7bb-7213aaf39ee6
Ancestors: Collections-ar.332

Signal KeyNotFound instead of a generic error and provide the key in the exception and error message.

=============== Diff against Collections-ar.332 ===============

Item was changed:
  ----- Method: Dictionary>>at: (in category 'accessing') -----
  at: key
  "Answer the value associated with the key."
 
+ ^ self at: key ifAbsent: [self errorKeyNotFound: key]!
- ^ self at: key ifAbsent: [self errorKeyNotFound]!

Item was changed:
  ----- Method: KeyedSet>>removeKey: (in category 'removing') -----
  removeKey: key
 
+ ^ self removeKey: key ifAbsent: [self errorKeyNotFound: key]!
- ^ self removeKey: key ifAbsent: [self errorKeyNotFound]!

Item was added:
+ ----- Method: Collection>>errorKeyNotFound: (in category 'private') -----
+ errorKeyNotFound: key
+ "Signal KeyNotFound error"
+ ^(KeyNotFound key: key) signal!

Item was changed:
  ----- Method: Dictionary>>removeKey: (in category 'removing') -----
  removeKey: key
  "Remove key from the receiver.
  If key is not in the receiver, notify an error."
 
+ ^ self removeKey: key ifAbsent: [self errorKeyNotFound: key]!
- ^ self removeKey: key ifAbsent: [self errorKeyNotFound]!

Item was changed:
  ----- Method: KeyedSet>>at: (in category 'accessing') -----
  at: key
  "Answer the value associated with the key."
 
+ ^ self at: key ifAbsent: [self errorKeyNotFound: key]!
- ^ self at: key ifAbsent: [self errorKeyNotFound]!

Item was changed:
  ----- Method: Dictionary>>associationAt: (in category 'accessing') -----
  associationAt: key
+ ^ self associationAt: key ifAbsent: [self errorKeyNotFound: key]!
- ^ self associationAt: key ifAbsent: [self errorKeyNotFound]!

Item was removed:
- ----- Method: Dictionary>>errorKeyNotFound (in category 'private') -----
- errorKeyNotFound
-
- self error: 'key not found'!

Item was removed:
- ----- Method: KeyedSet>>errorKeyNotFound (in category 'private') -----
- errorKeyNotFound
-
- self error: 'key not found'!