On May 15, 1:29 am, LJ wrote:
> I am trying to add exception handling to my application.
> I have been reading the documentation on Django
> Exceptions:https://docs.djangoproject.com/en/dev/ref/exceptions/
> I also found the list of Exceptions (both Django and Python).
> But for testing purposes,
On May 15, 2:31 am, Nikolas Stevenson-Molnar
wrote:
> You could also log the whole stack trace using the traceback
> module:http://docs.python.org/library/traceback.html
Or just use logging.exception, that takes care of all the gory details
in a single and simple call:
try:
foo = bar.baaz()
You could also log the whole stack trace using the traceback module:
http://docs.python.org/library/traceback.html
_Nik
On 5/14/2012 4:54 PM, Luis Gonzalez wrote:
> Hi as you can see here at http://docs.python.org/tutorial/errors.html
> in 8.3 handling exceptions theres a piece of code that works
Hi as you can see here at http://docs.python.org/tutorial/errors.html
in 8.3 handling exceptions theres a piece of code that works as you
want.
for example try this:
try:
int("a")
except Exception as e: #The key is using "as" and the variable name
you like for retrieving the exception because i
I am trying to add exception handling to my application.
I have been reading the documentation on Django Exceptions:
https://docs.djangoproject.com/en/dev/ref/exceptions/
I also found the list of Exceptions (both Django and Python).
But for testing purposes, I need a way to handle all exceptions an
5 matches
Mail list logo