My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ImprovedExceptionHierarchy  

We added a new instance variable to Exception, called signaler. The idea is to abstract out the concept of the subject of the Exception since all Exceptions need that. Sometimes it is called receiver. We initialize signaler automatically when an exception is signaled (#signal) and set it to be equal to the #receiver since that will most of the time be right, unless it was already set by the caller.

Exception (+signaler, messageText)
  Abort
  Error
    ArithemticError
      ZeroDivide (--dividend)	
      FloatingPointException
      DomainError (from, to) ADDED
      NaNException ADDED
    FileStreamException (fileName)
      FileDoesNotExistException (?readOnly)
      FileExistsException (fileClass)
      FileWriteError
      FileReadError **
      FileClosedException **
      PermissionException **
      CannotDeleteFileException -- FilePermissionException
    MessageNotUnderstood (message, --receiver)
      ShouldNotCall
    NonBooleanReceiver (--object) -- MNU
    OutOfMemory
    Halt
      AssertionFailure
      BreakPoint
    SyntaxError ** !exists! (input, position)  ParsingError
      NumberFormatException ** ?
    ErrorNonInteractive ** NoInteractionAllowed
    TimedOut ** (operation, timeout) !exist as Warning!
    VerificationException
    IllegalOperation ** (operation, object)
    SizeMismatch ADDED
    CollectionIsEmpty ADDED
    SelectorException (selector) ADDED
      SubclassResponsibility ADDED
      PrimitiveFailed ADDED
      SubclassResponsibility ADDED
      ShouldNotImplement ADDED
      ShouldBeImplemented ADDED
    ReadOnlyReceiver **
    OutOfFreeSpace ** (size)
    InvalidArgument ** (message, argument)
      NonIntegerIndex **
    NotIndexable, NoKeyedAccess, CannotInstanciate ShouldNotCall ?
    SubscriptOutOfBounds (subscript, lowerBound, upperBound) ADDED
    NotFound (object) ADDED
      KeyNotFound OK
      ValueNotFound ADDED
    StreamException
      PositionError ** (index, from, to) 
      EndOfStream **
      BeginOfStream **
  Warning
    LowMemory ** (percentageFree)
    NotYetImplemented ** (message)
Comment by skrishna...@gmail.com, Apr 16, 2011

Reconsider hierarchy for:

DomainError?

Club these together :

SubclassResponsibility? NotYetImplemented? ShouldNotCall? CannotInstantiate?. (note spelling also )

Comment by project member sven.van...@gmail.com, Apr 17, 2011

Hi, can you be more specific ? What do you mean by 'reconsider hierarchy' ? Club together, how ? In one class ?? under one superclass ? Please propose something.

Sven


Sign in to add a comment
Powered by Google Project Hosting