Avoid reraising some exceptions and losing the stack trace
Avoid losing stack trace reraising in debug mode