CARMA C++
|
This is the include file for Carma exception handling utilities. More...
#include <exception>
#include <string>
#include <iosfwd>
#include <vector>
#include <memory>
#include <cstdlib>
#include <cstring>
#include <log4cpp/Priority.hh>
#include "carma/util/Backtrace.h"
Go to the source code of this file.
Classes | |
class | carma::util::BaseException |
Base exception class for managing carma errors. More... | |
Namespaces | |
module | carma |
IDL for bima Rx Control, inherits from antenna::common::RxControl. | |
carma::util | |
Utility classes. | |
Macros | |
#define | CARMA_EXCEPTION(x, y) |
Trick to get the file name and line number passed to the exception handler. More... | |
#define | CARMA_TEST(e, ce, m) |
Macro for testing a condition and then logging and throwing a BaseException or derivative if the condition is false. More... | |
This is the include file for Carma exception handling utilities.
File containing declarations for the CARMA base exception class. Uses some tricks to ensure that file name and line number of location where exception is created is captured by the exception handler. Actual constructor uses three parameters, but most users will really use something that has only the first parameter. However, the macro definition at the end of the file will ensure that the file name and line number are inserted at the appropriate place.
WARNING The macro has to be disabled if for some reason the original definition of the constructor with three parameters is required. Macros may be disabled using the compiler option '-Umacro', or by using '#ifdef'/'#undef' combinations in your source file.
Definition in file BaseException.h.
#define CARMA_EXCEPTION | ( | x, | |
y | |||
) |
Trick to get the file name and line number passed to the exception handler.
Constructs an instance of the type specified by argument x using argument y as the first parameter to the constructor and automagically generating the file and line number parameters to the constructor.
Definition at line 258 of file BaseException.h.
#define CARMA_TEST | ( | e, | |
ce, | |||
m | |||
) |
Macro for testing a condition and then logging and throwing a BaseException or derivative if the condition is false.
This macro tests the input condition and upon failure, creates an input exception type with the specified message, logs it at the ERROR priority level and finally throws the exception.
Definition at line 268 of file BaseException.h.