[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error Handling in 2.0



Hi all;

I am looking into error handling beyond 1.3 and wondering what people
think.  I am tentatively inclined to suggest as follows:

use Class::Struct LedgerSMB::Error => {
       type => '$', # one of FATAL, ERROR, WARN, DEBUG, INFO
       module => '$', # Hexadecimal notation of module raising the error
       id => '$', # hexadecimal notation of error id
       msg => '$', # Unlocalized string of error message
       extended => '$', # Extended information on error, may be logged
displayed
                              # to user depending on context and settings
        stack_trace => 'Devel::StackTrace' # generated automatically if settings
                                                          # require
};

I am then thinking about subclassing this out to LedgerSMB::Error::Web
with no additional members.

What do folks think?

Best Wishes,
Chris Travers