[reportlab-users] Tracing and Debugging support in Platypus

Andy Robinson reportlab-users@reportlab.com
Sun, 9 Nov 2003 08:55:43 -0000


> .... I tried this before with an automatic mechanism for getting file
> and lineno info at instance creation time if nothing was supplied. A
> difficulty is deciding where the identity is defined.

Yes.  My plan is just to let the programmer of the app explicitly
add the line info, or any other info they want.  It doesn't help
to know that a Table instance caused the trouble.  It does
help to know that it was the table containing the photograph
of Customer #14326 in your database, which someone saved
400 pixels wide instead of 100.


Let's generalize it a bit.  If your flowable has a TraceInfo
object attached, the TraceInfo object gets a chance to inspect
and modify the Exception object being handled.

Then, with RML, we add source file and line number.  With something
else, you add whatever you want by subclassing it.

> As for logging I think that should be a separate issue.  

Yup. I guess we could pass in a logger object as optional keyword
to go().  I like hte logging interface, but it means we need
to define a really cut down logger class in reportlab.lib for
people below 2.3

- Andy