serpy icon indicating copy to clipboard operation
serpy copied to clipboard

Exceptions are not easy to trace

Open Cediddi opened this issue 8 years ago • 0 comments

Because serpy uses a simple approach of using builtin type functions, exceptions are hard to trace back.

For example, data is a string expected to be casted into integer, if int function fails, the exception will only say invalid literal for int() with base 10: '' which is easy to understand but hard to traceback.

What I propose is a small try except block in _serialize, that'll modify the exception to include serializer and field names. I believe, this'll improve error tracing and debugging vastly.

Cediddi avatar May 26 '17 07:05 Cediddi