#include <string>
#include <iostream>
#include "consmgr.h"
Go to the source code of this file.
Classes | |
class | CMException |
An abstract exception class. More... | |
class | pthread_exception |
An exception object to carry information related to failures of pthread library calls. More... | |
class | fireball |
class | CMInvalidParameter |
An exception to indicate that a method was invoked with one or more invalid parameters or conditions. More... | |
class | CMUnsupported |
An exception to indicate an unsupported operation. More... | |
class | CMStateChange |
class | CMFailure |
Defines | |
#define | PTHREAD_CHECK_AND_THROW(rc, str) if ((rc) != 0) throw(pthread_exception(__FILE__, __LINE__, (rc), (str))) |
pthread error handling macro. | |
#define | CATCH_OR_DIE(ec) |
#define | CATCH_STR_OR_DIE(ec) |
Variables | |
char * | __progname |
All of these are eventually descendants of std::exception.
Definition in file exceptions.h.
#define PTHREAD_CHECK_AND_THROW | ( | rc, | |||
str | ) | if ((rc) != 0) throw(pthread_exception(__FILE__, __LINE__, (rc), (str))) |
pthread error handling macro.
If the return-code of the pthread function ('rc') indicates a failure, construct a [temporary] pthread_exception with the relevant data in it, and throw that...
Definition at line 96 of file exceptions.h.
Referenced by accept_and_send_on_connection(), ConnectionList::add(), Connection::Connection(), ConnectionList::ConnectionList(), FDConnector::FDConnector(), Messageable::get_message(), Getcap::Getcap(), Guard::Guard(), Guard::initialize_mutex(), LibConfig::LibConfig(), SocketListener::listen_for_incoming(), YAML::load_entry(), LibConfig::load_entry(), Message::Lock(), main(), Connection::manager(), Messageable::Messageable(), Messager::Messager(), ConnectionList::mutexed_for_each(), Outlet::Outlet(), Outlet::queue_data(), Messageable::queue_message(), ConnectionList::remove(), MasterController::run(), Outlet::start_engine(), BiDirConn::start_engine(), Incoming::start_listening(), Outlet::stop_engine(), BiDirConn::stop_engine(), TTYConnector::TTYConnector(), Message::Unlock(), History::write(), Outlet::write_data(), Outlet::writer(), YAML::YAML(), BiDirConn::~BiDirConn(), ConnectionList::~ConnectionList(), Getcap::~Getcap(), Guard::~Guard(), Incoming::~Incoming(), LibConfig::~LibConfig(), Messager::~Messager(), Outlet::~Outlet(), and YAML::~YAML().
#define CATCH_OR_DIE | ( | ec | ) |
Value:
catch (pthread_exception &pe) { \ std::cerr << pe.what() << std::endl; \ exit((ec)); \ } catch (fireball &f) { \ f.bail(std::cerr); \ } catch (std::exception &e) { \ std::cerr << "Standard exception: " \ << e.what() << std::endl; \ exit((ec)); \ } catch (...)
Definition at line 167 of file exceptions.h.
Referenced by Incoming::listener_thread(), Connection::shutdown(), MasterController::start_connections(), and TTYConnector::~TTYConnector().
#define CATCH_STR_OR_DIE | ( | ec | ) |
Value:
catch (pthread_exception &pe) { \ std::cerr << pe.what() << std::endl; \ exit((ec)); \ } catch (fireball &f) { \ f.bail(std::cerr); \ } catch (char *s) { \ std::cerr << s << std::endl; \ exit((ec)); \ } catch (string &s) { \ std::cerr << s << std::endl; \ exit((ec)); \ } catch (std::exception &e) { \ std::cerr << "Standard exception: " \ << e.what() << std::endl; \ exit((ec)); \ } catch (...)
Definition at line 178 of file exceptions.h.
Referenced by main(), Connection::manager(), and MasterController::start_connections().
char* __progname |
Referenced by LogFile::connect(), fireball::fireball(), and usage().