> What is hard about debugging? You get the traceback from logger.exception,
> don't you? I'm not necessarily a fan of keeping it, but knowing where
> expected error cases are vs. brand new unanticipated errors has some value to
> developers.
Hey Todd,
Yes. I got a traceback that looked like this:
2011-09-15 12:37:02,599 ERROR nova.rpc [-] Exception during message handling
(nova.rpc): TRACE: Traceback (most recent call last):
(nova.rpc): TRACE: File "/usr/lib/pymodules/python2.6/nova/rpc/impl_kombu.py", line 620, in _process_data
(nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc): TRACE: File "/usr/lib/pymodules/python2.6/nova/exception.py", line 129, in wrapped
(nova.rpc): TRACE: raise Error(str(e))
(nova.rpc): TRACE: Error: list index out of range
(nova.rpc): TRACE:
---
Which pretty much tells me nothing! The issue I have with the code I removed is it effectively erases the full stack traces from runtime exceptions. Essentially anything that doesn't extend Error or NovaException won't get logged with a full stack trace.
The root cause of the exceptions getting wiped out is utils.to_primative which seems to have been added intentially but IMHO is somewhat of an evil method. Probably best not to get into that here however.
> What is hard about debugging? You get the traceback from logger.exception,
> don't you? I'm not necessarily a fan of keeping it, but knowing where
> expected error cases are vs. brand new unanticipated errors has some value to
> developers.
Hey Todd,
Yes. I got a traceback that looked like this:
2011-09-15 12:37:02,599 ERROR nova.rpc [-] Exception during message handling pymodules/ python2. 6/nova/ rpc/impl_ kombu.py" , line 620, in _process_data context= ctxt, **node_args) pymodules/ python2. 6/nova/ exception. py", line 129, in wrapped
(nova.rpc): TRACE: Traceback (most recent call last):
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: rval = node_func(
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: raise Error(str(e))
(nova.rpc): TRACE: Error: list index out of range
(nova.rpc): TRACE:
---
Which pretty much tells me nothing! The issue I have with the code I removed is it effectively erases the full stack traces from runtime exceptions. Essentially anything that doesn't extend Error or NovaException won't get logged with a full stack trace.
The root cause of the exceptions getting wiped out is utils.to_primative which seems to have been added intentially but IMHO is somewhat of an evil method. Probably best not to get into that here however.