While doing some PSP
development I am finding that the error reporting might be able to use some
improvements to help out in development and debugging.
A couple of ideas
come up at the moment, such as:
PSP
parsing errors should display the filename, and preferably the line number of
the PSP file associated with the error.
Errors while
importing PSP files should display the PSP file name, or maybe the python file
to aid in tracking down the problems.
I have done some
experimenting with solutions to these, but before I go much further, I wanted to
toss it out to see if there are some other issues I should be
considering.
One of the solutions
I am considering is to create a WebwareException class as a base-class
to PSP exceptions. This would have some additional fields to
hold perhaps a PSP filename and line number if known, or an original Python
exception in the case of import errors. The ExceptionHandler could then
either print this information when the exception is an instance of a
WebwareException, or perhaps just have the __str__ method on WebwareException
smart enough to return the formatted information.
Has anyone else
encountered a need for this, would this be a welcome enhancement? What
else should be considered?
Stuart Donaldson
