[BangPypers] for exception tracing

Noufal Ibrahim noufal at nibrahim.net.in
Wed Jul 31 06:55:10 CEST 2013


Nitin Kumar <nitin.nitp at gmail.com> writes:


[...]

> 1) for error handling in perl we have lots of modules , on including
> and with proper subroutine call with error mode the execution dies
> with a code trace,

This is Python's default behaviour. If there's an uncaught exception,
the interpreter dies with a nice traceback. Perl, if I remember
correctly, doesn't have this built into the core and requires a third
party package to enable it. 

> Similliarly for python is there any specific package that i can use or
> do i need to use try catch every time.

Exceptions need to be caught at the right level and dealt with over
there. If something breaks and you get an exception that percolates to
the top, you can catch it and invoke your debugger along with some stack
information. This is what many web frameworks and toolkits do[1]. 

[...]



Footnotes: 
[1]  http://werkzeug.pocoo.org/docs/debug/

-- 
Cordially,
Noufal
http://nibrahim.net.in


More information about the BangPypers mailing list