Improved consistency of exception handling

Signed-off-by: Frank Mertens <frank@cyblogic.de>