Ticket #178 (new enhancement)

Opened 10 years ago

Method returns not implemented and error handling

Reported by: michelpons Owned by: Michael Halloran
Priority: major Milestone:
Component: COLoggers Version: 2.1
Keywords: Errors Cc: michaelhalloran

Description

I have a Property Package on which a method is not implemented, meaning the method that returns the list of pressure dependent pure compound properties returns an exception ECapeNotImpl when called. If this PMC is logged with COLTT 2.1 Build 280 and automatic error logging is ticked on, the run finishes in a PME crash with an unhandled exception raised. The crash happens in the calls to the error handling properties because getdescription returns an exception.

There are several ways to handle that situation. Either any method on a PME or a PMC, even if returning not implemented should have error interface fully implemented. Or COLTT should refrain of calling error methods on a method returning not implemented. Or COLTT should be ready to handle exceptions on any calls related to errors. May be the last two proposals are the best one.
I don't see the point of constraining a developer to fully develop the error methods on a method which is itself not implemented. Not implemented means there is no logic implemented in the method and error handling methods are bringing usually information on top of any exception raised so some logic has to be implemented which is in contradiction with a non-implemented method.

Note: See TracTickets for help on using tickets.