Hi Charles,
I second your motion. BTW, here's what I'm doing for as a workaround. There may be a better way, so I'm all ears as to better methodologies.
rather than being clueless as to where my errors occurred or trying to decipher extremely crpytic error codes produced by the log files, I do this
at top of algo use a constant
VERBOSEMODE = True
Then inside each procedure or function I use try except statements, with "reached line number" and optional varriable logging code. Here's the pseudcode sample:
def someFunction(self,somevar):
try:
someVar = 1
if VERBOSEMODE: self.Log("got past line 5 of someFunction with somevar = {}". format(someVar) )
someOtherBrokenVar = 42.000 / 0
if VERBOSEMODE: self.Log("got past line 7 of someOtherBrokenFunction with somevar = {}". format(someOtherBrokenVar) )
except:
self.Log('An unknown error occurred running someFunction ' + str(sys.exc_info()[0]) )
So this code would pass first level variable definition and bomb on second one (division by zero). You would have a clue up to where your code ran fine and an idea about type of error causing problems
If you later get tired of seeing all the log files, simply erase those lines or turn VERBOSEMODE to False.
Hope that helps someone. Now if some bright python guru could tell me how to automatically generate the linenumber (so I don't have to handcode them) as well as function name, it would be even simpler.