[PEAK] "State of the Mountain" doc

Chad Rosenberg chad at idrankwhat.net
Mon Jan 26 17:38:12 EST 2004


"""
  exceptions
     I'd actually like to rename this to errors, or else move the 
exceptions themselves back to individual packages' interface modules. 
exceptions actually conflicts with the name of a standard library 
module.
"""

If you are going to make changes to peak.exceptions, you may want to 
also consider creating a peak base exception class followed by some 
more general categories like NamingException.

Something like:

class PeakException(Exception): pass
...

class NamingException(PeakException): pass
...

class StorageException(PeakException): pass

class NotReadyError(StorageException):
     """One or more transaction participants were unready too many 
times"""

class TransactionInProgress(StorageException):
     """Action not permitted while transaction is in progress"""

class OutsideTransaction(StorageException):
     """Action not permitted while transaction is not in progress"""

class BrokenTransaction(StorageException):
     """Transaction can't commit, due to participants breaking contracts
        (E.g. by throwing an exception during the commit phase)"""
...

That way anything in the above category could be caught in a bundle 
first by:

     except exceptions.StorageException:
         ...

     except exceptions.PeakException:
         ...

as opposed to listing all the variants under the "# Storage" section 
individually.

An idea.

   - Chad


On Jan 24, 2004, at 6:59 PM, Phillip J. Eby wrote:

> Please take a moment to look at and comment on:
>
> http://peak.telecommunity.com/doc/STATUS.txt.html
>
> It's a brief summary of what the state of each major package in PEAK 
> is, and expected changes (if any) in the coming year.
>
> Thanks.
>
> P.S.  It's interesting to note that of sixteen top-level packages and 
> modules, *seven* were created in the past seven months.  That is, we 
> seem to be growing about one top-level package per month.
>
> _______________________________________________
> PEAK mailing list
> PEAK at eby-sarna.com
> http://www.eby-sarna.com/mailman/listinfo/peak




More information about the PEAK mailing list