Frank Shearar uploaded a new version of Exceptions to project The Inbox:
http://source.squeak.org/inbox/Exceptions-fbs.40.mcz ==================== Summary ==================== Name: Exceptions-fbs.40 Author: fbs Time: 30 January 2013, 12:26:24.885 pm UUID: 44e7df62-7a42-42c4-91d1-617103362029 Ancestors: Exceptions-fbs.39 Exception hierarchy for errors where someone has forgotten to do something. NotImplementedError is the base class. =============== Diff against Exceptions-fbs.39 =============== Item was changed: + NotImplementedError subclass: #MessageNotUnderstood - Error subclass: #MessageNotUnderstood instanceVariableNames: 'message receiver reachedDefaultHandler' classVariableNames: '' poolDictionaries: '' category: 'Exceptions-Kernel'! !MessageNotUnderstood commentStamp: '<historical>' prior: 0! This exception is provided to support Object>>doesNotUnderstand:.! Item was added: + Error subclass: #NotImplementedError + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Exceptions-Kernel'! Item was changed: + NotImplementedError subclass: #NotYetImplemented - Error subclass: #NotYetImplemented instanceVariableNames: 'receiverClass selector context' classVariableNames: '' poolDictionaries: '' category: 'Exceptions-Kernel'! !NotYetImplemented commentStamp: 'jcg 10/21/2009 01:20' prior: 0! Sent by #notYetImplemented. Better than the age-old behavior of opening a notifier window, because this can be caught and handled. ! Item was changed: + NotImplementedError subclass: #SubclassResponsibilityError + instanceVariableNames: '' - Error subclass: #SubclassResponsibilityError - instanceVariableNames: 'selector offendingClass calledArguments' classVariableNames: '' poolDictionaries: '' category: 'Exceptions-Kernel'! !SubclassResponsibilityError commentStamp: 'fbs 1/26/2013 00:20' prior: 0! I am signalled when a subclass fails to implement an "abstract method" and something sends an instance of this subclass the unimplemented message.! |
On Wed, Jan 30, 2013 at 4:26 AM, <[hidden email]> wrote: + Error subclass: #NotImplementedError + NotImplementedError subclass: #SubclassResponsibilityError The usual naming convention for exceptions is to omit the the "Error" part of the name (e.g., MessageNotUnderstood). So these new exceptions ought to be:
NotImplemented NotYetImplemented SubclassResponsibility Otherwise, looks great! Colin |
On 30 January 2013 18:33, Colin Putney <[hidden email]> wrote:
> > > On Wed, Jan 30, 2013 at 4:26 AM, <[hidden email]> wrote: > >> >> + Error subclass: #NotImplementedError >> >> + NotImplementedError subclass: #NotYetImplemented >> >> + NotImplementedError subclass: #SubclassResponsibilityError > > > > The usual naming convention for exceptions is to omit the the "Error" part > of the name (e.g., MessageNotUnderstood). So these new exceptions ought to > be: > > NotImplemented > NotYetImplemented > SubclassResponsibility > > Otherwise, looks great! Hm, OK. I named them that way thinking that was the convention. But sure, I'd prefer to nix the Error prefix. Ah, I think I may have got this idea from the Notification hierarchy. Maybe? frank > Colin > > > |
On Wed, Jan 30, 2013 at 10:46 AM, Frank Shearar <[hidden email]> wrote:
Yeah, it goes against our instinct to name things with the noun, and other languages (eg. Java) *do* include the suffix. But I think it does produce a better effect. Notifications are a bit weird, because you often get names that reflect the use case of the exception–things like "Request."
Colin |
Free forum by Nabble | Edit this page |