<div>Hello. I'm having my way with exceptions in a little program I've done, and I'm wondering... What is a decent way of dealing with them? By a decent way I mean, what should I do when I see that an exception has occurred? I've seen that Python's default action is to print a stack trace. As far as I know, exception handling is a mean of knowing what can go wrong with your program, like anticipating wrongs and treating them.
</div>
<div> </div>
<div>What I'm having trouble understanding is this: if I use a "raise" sentence to raise an exception... shoul I use it inside a "try" block, so I can catch it with an "except" block? If I don't do that, a stack trace will be printed onto the screen... Is that the way it's usually done?
</div>
<div> </div>
<div>Please, help me out, for I'm kind of new to exceptions and I want to know if I get them right.</div>
<div> </div>
<div>Thanks a lot in advance.</div>
<div>Jose Carlos.</div>