void myexception(std::exception& e) { std::cout<<"Exception: "<<e.what()<<std::endl; std::cout.flush(); std::cerr.flush(); exit(1); }
void boost::throw_exception(std::exception const & e) { std::cout << "Boost exception: " << e.what() << std::endl; }
void Window::DefaultExceptionHandler::HandleException(const std::exception& t) { // Try to keep running. std::cerr << t.what(); }
void SubscriberReconnectCallback::operationFailed(const std::exception& exception) { LOG4CXX_ERROR(logger, "Error writing to new subscriber. Channel should pick this up disconnect the channel and try to connect again " << exception.what()); }
void console::complain(const char * what, std::exception const & e) { complain(what, e.what()); }
void LogException(const std::string& prefix, const std::exception& e, const Args&... args) { LogError(prefix, e.what(), args...); }
void acceptError(const std::exception& ex) noexcept override { LOG(ERROR) << "Connection accept error: " << ex.what(); }
void qlFlatHazardRateDataReaderListenerImpl::on_std_exception( DDS::DataReader_ptr reader, defaulttermstructures::qlFlatHazardRate&, std::exception& e ) { ACE_ERROR((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: ") ACE_TEXT("qlFlatHazardRateDataReaderListenerImpl::on_std_exception %s\n"), e.what() )); }
void qlRelinkableHandleDefaultProbabilityTermStructureDataReaderListenerImpl::on_std_exception( DDS::DataReader_ptr reader, defaulttermstructures::qlRelinkableHandleDefaultProbabilityTermStructure&, std::exception& e ) { ACE_ERROR((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: ") ACE_TEXT("qlRelinkableHandleDefaultProbabilityTermStructureDataReaderListenerImpl::on_std_exception %s\n"), e.what() )); }
Exception::Exception(const std::string& msg, const std::exception& e) : m_msg(msg + " failed with " + std::string(e.what())) {}
void HandleException(ISafeRunnable::Pointer code, const std::exception& e) { HandleException(code, ctkException(e.what())); }
void Options::reportError(const std::exception& e) const { error_stream << "Error: " << e.what() << "\nSee '" << program_name_ << " --help' for available options\n"; }
void throw_exception(const std::exception & e) { arx_assert_msg(false, "Boost triggered an unhandled exception! %s", e.what()); ARX_UNUSED(e); }
// Sets EG(exception), call this and then RETURN_NULL(); void throw_zend_exception_from_std_exception(const std::exception& ex) { zend_throw_exception(zend_exception_get_default(TSRMLS_CC), const_cast<char*>(ex.what()), 0 TSRMLS_CC); }
void RFXComTCP::OnError(const std::exception e) { _log.Log(LOG_ERROR, "RFXCOM: Error: %s", e.what()); }
void ensure_contains(const std::exception & error, const char * sought) { ensure_contains(error.what(), sought); }
void qlAssetSwap2DataReaderListenerImpl::on_std_exception( DDS::DataReader_ptr reader, assetswap::qlAssetSwap2&, std::exception& e ) { ACE_ERROR((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: ") ACE_TEXT("qlAssetSwap2DataReaderListenerImpl::on_std_exception %s\n"), e.what() )); }
inline std::string to_string( std::exception const & x ) { return x.what(); }
void boost::throw_exception(std::exception const& ex) { std::cout << ex.what() << std::endl; abort(); }
} CATCH(const std::exception& e) { LogWarning << "Got exception while instantiating geometry (after controller failed) (" << scene.GetInstanceController(c._objectIndex)._reference.AsString().c_str() << "). Exception details:"; LogWarning << e.what(); }
void SubscriberConsumeCallback::operationFailed(const std::exception& exception) { LOG4CXX_ERROR(logger, "ConsumeCallback::operationFailed " << data->getTopic() << " - " << data->getSubscriberId()); int retrywait = client->getConfiguration().getInt(Configuration::SUBSCRIBER_CONSUME_RETRY_WAIT_TIME, DEFAULT_SUBSCRIBER_CONSUME_RETRY_WAIT_TIME); LOG4CXX_ERROR(logger, "Error passing message to client transaction: " << data->getTxnId() << " error: " << exception.what() << " retrying in " << retrywait << " Microseconds"); boost::asio::deadline_timer t(handler->getChannel()->getService(), boost::posix_time::milliseconds(retrywait)); t.async_wait(boost::bind(&SubscriberConsumeCallback::timerComplete, handler, m, boost::asio::placeholders::error)); }
void JniThrowException(JNIEnv* env, const std::exception& e) { JniThrowException(env, e.what()); }
void ConsumeWriteCallback::operationFailed(const std::exception& exception) { int retrywait = client->getConfiguration().getInt(Configuration::MESSAGE_CONSUME_RETRY_WAIT_TIME, DEFAULT_MESSAGE_CONSUME_RETRY_WAIT_TIME); LOG4CXX_ERROR(logger, "Error writing consume transaction: " << data->getTxnId() << " error: " << exception.what() << " retrying in " << retrywait << " Microseconds"); boost::asio::deadline_timer t(client->getService(), boost::posix_time::milliseconds(retrywait)); t.async_wait(boost::bind(&ConsumeWriteCallback::timerComplete, client, data, boost::asio::placeholders::error)); }
void DiagnosticsDialog::exceptionMessage(const std::exception& e, const QString& context) { pushMessage(MS_EXCEPTION, (context.isEmpty() ? "" : context + "\n\n" + QString::fromUtf8(e.what()))); // error message is important, make sure the diagnostics are shown show(); }
void MySensorsTCP::OnError(const std::exception e) { _log.Log(LOG_ERROR,"MySensors: %s",e.what()); }
/** * Rethrow an exception of type specified by the dynamic type of * the specified exception, adding the specified line number to * the specified exception's message. * * @param[in] e original exception * @param[in] line line number in Stan source program where * exception originated * @param[in] reader trace of how program was included from files */ inline void rethrow_located(const std::exception& e, int line, const io::program_reader& reader = stan::io::program_reader()) { using std::bad_alloc; // -> exception using std::bad_cast; // -> exception using std::bad_exception; // -> exception using std::bad_typeid; // -> exception using std::ios_base; // ::failure -> exception using std::domain_error; // -> logic_error using std::invalid_argument; // -> logic_error using std::length_error; // -> logic_error using std::out_of_range; // -> logic_error using std::logic_error; // -> exception using std::overflow_error; // -> runtime_error using std::range_error; // -> runtime_error using std::underflow_error; // -> runtime_error using std::runtime_error; // -> exception using std::exception; // create message with trace of includes and location of error std::stringstream o; o << "Exception: " << e.what(); if (line < 1) { o << " Found before start of program."; } else { io::program_reader::trace_t tr = reader.trace(line); o << " (in '" << tr[tr.size() - 1].first << "' at line " << tr[tr.size() - 1].second; for (int i = tr.size() - 1; --i >= 0; ) o << "; included from '" << tr[i].first << "' at line " << tr[i].second; o << ")" << std::endl; } std::string s = o.str(); if (is_type<bad_alloc>(e)) throw located_exception<bad_alloc>(s, "bad_alloc"); if (is_type<bad_cast>(e)) throw located_exception<bad_cast>(s, "bad_cast"); if (is_type<bad_exception>(e)) throw located_exception<bad_exception>(s, "bad_exception"); if (is_type<bad_typeid>(e)) throw located_exception<bad_typeid>(s, "bad_typeid"); if (is_type<domain_error>(e)) throw domain_error(s); if (is_type<invalid_argument>(e)) throw invalid_argument(s); if (is_type<length_error>(e)) throw length_error(s); if (is_type<out_of_range>(e)) throw out_of_range(s); if (is_type<logic_error>(e)) throw logic_error(s); if (is_type<overflow_error>(e)) throw overflow_error(s); if (is_type<range_error>(e)) throw range_error(s); if (is_type<underflow_error>(e)) throw underflow_error(s); if (is_type<runtime_error>(e)) throw runtime_error(s); throw located_exception<exception>(s, "unknown original type"); }
void throw_exception(std::exception const& e) { std::cerr << "Fake exception: " << e.what() << "\n"; std::exit(255); }
CEGUI_CATCH (std::exception& exc) { outputExceptionMessage(exc.what()); }
void StackException::add(const std::exception &e) { add("%s", e.what()); }
void UncaughtThreadException::setException(const std::exception& ex) { mDescription = ex.what(); mLocation = ""; mStackTrace = ""; }