improve exception vs. exit handling
cleanup exception handling - use new exception hierarchy (since python 2.5)
Merge remote-tracking branch 'origin/pr/140' into pr140