Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions are not easy to trace #46

Open
Cediddi opened this issue May 26, 2017 · 0 comments
Open

Exceptions are not easy to trace #46

Cediddi opened this issue May 26, 2017 · 0 comments

Comments

@Cediddi
Copy link

Cediddi commented May 26, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant