Add support for C++ environments with no exception support (has to manual check for exceptions)