views:

57

answers:

1

I very like the standard way of server side (python) exception handling in Django. And I want to have the same mechanism of client side (javascript) handling of exceptions.

Now I found only DamnIT. But this server is returning 502 error now, and I don't like so much the way to use external service for simple sending emails with exceptions to me. I think it's trivial purpose for little Django's app.

Does anyone try to solve this problem already?

+1  A: 

You would have to create a view in your app that sends you an error mail when called, then put error handling in your JavaScript that sends your error information to this view when an exception occurs and is caught. You'd probably want to use the send_mail function.

However, I'd greatly question the safety of this, as you're essentially opening up to people freely spamming your error reporting address at will. I suppose you could put in some logic that prevents duplicate errors from filling your box, and prevents massive amounts of errors from a single source, though.

Daniel Bruce