Add exception handlers to all unit tests, tutorials and examples

make the exception handling code consistent with opm/opm-core#352