Exception handling reform

Signed-off-by: Frank Mertens <frank@cyblogic.de>
Improved error and exception handling

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