Class ExParallel implements the features of a parallel exception. It is a std::string which stores the exception description. It also provides "put to" (operator;lt&;lt&) functions for appending the description with information.
More...
#include <Exception.hpp>
|
virtual | ~ExParallel () |
|
virtual const char * | what () const throw () |
| Member function what returns the exception's description. More...
|
|
ExParallel & | clear () |
| Member function clear clears the contents of the exception. More...
|
|
ExParallel & | setDescription (const std::string &description) |
| Member function setDescription sets the value of the exception's description. More...
|
|
std::string | getDescription () const |
| Member function getDescription returns the exception's description. More...
|
|
std::ostringstream & | getDescriptionStream () |
| Member function getDescriptionStream returns the stream used to assemble the description. More...
|
|
const std::ostringstream & | getDescriptionStream () const |
| Member function getDescriptionStream returns the stream used to assemble the description. More...
|
|
ExParallel & | setTraceback (const std::string &traceback) |
| Member function setTraceback sets the exception's traceback to the caller generating the exception. More...
|
|
const std::string & | getTraceback () const |
| Member function getTraceback returns the exception's traceback string. More...
|
|
ExParallel & | setParallel (int parallel) |
| Member function setParallel sets the originating processor for an exception that is being thrown in parallel. More...
|
|
int | getParallel () const |
| Member function getParallel returns the originating processor for a parallel exception or -1 if the exception was not thrown in parallel. More...
|
|
bool | isParallel () const |
| Member function isParallel returns true if the exception is being thrown in parallel. More...
|
|
ExParallel & | operator<< (std::ostream &(*f)(std::ostream &)) |
| Member function operator<< passes the std manipilator functions to the ExParallel object. This allows the manipulators to modify the description. (Currently in a limited fashion). More...
|
|
template<class U > |
ExParallel & | operator<< (const U &t) |
|
virtual void | throw_copy () const =0 |
| Member function throw_copy is a pure virtual function which is allows the copying and throwing of the parallel exception using a pointer to the base exception object. This function should never return, it should throw the copied exception. More...
|
|
virtual void | parallel_handler () |
| Member function parallel_handler is called just before a parallel exception is thrown. It is guaranteed to be called in parallel on all processors, so collective communication is allowed inside Parallel_Handler. This function might be used to copy information to all processors. The default is to do nothing.
|
|
Class ExParallel implements the features of a parallel exception. It is a std::string which stores the exception description. It also provides "put to" (operator;lt&;lt&) functions for appending the description with information.
Definition at line 271 of file Exception.hpp.
◆ ExParallel() [1/3]
sierra::ExParallel::ExParallel |
( |
| ) |
|
|
inlineprotected |
Creates a new ExParallel instance which is not about to be thrown in parallel and has no description.
Definition at line 279 of file Exception.hpp.
◆ ExParallel() [2/3]
sierra::ExParallel::ExParallel |
( |
const std::string & |
message, |
|
|
int |
parallel = -1 |
|
) |
| |
|
inlineexplicitprotected |
Creates a new ExParallel instance with an initial description and may be about to be thrown in parallel.
- Parameters
-
message | an std::string const reference to the initial description. |
parallel | an bool value of true if this exception is about to be thrown in parallel. |
Definition at line 299 of file Exception.hpp.
◆ ExParallel() [3/3]
sierra::ExParallel::ExParallel |
( |
const ExParallel & |
x | ) |
|
|
inlineprotected |
◆ ~ExParallel()
virtual sierra::ExParallel::~ExParallel |
( |
| ) |
|
|
inlinevirtual |
◆ what()
virtual const char* sierra::ExParallel::what |
( |
| ) |
const |
throw | ( | |
| ) | | |
|
inlinevirtual |
Member function what returns the exception's description.
- Returns
- a char const pointer to the exception's description.
Reimplemented in sierra::ExTemp< T >.
Definition at line 339 of file Exception.hpp.
◆ clear()
Member function clear clears the contents of the exception.
- Returns
- an ExParallel reference to the exception.
Definition at line 354 of file Exception.hpp.
◆ setDescription()
ExParallel& sierra::ExParallel::setDescription |
( |
const std::string & |
description | ) |
|
|
inline |
Member function setDescription sets the value of the exception's description.
- Parameters
-
description | a std::string const reference to the description. |
- Returns
- an ExParallel reference to the exception.
Definition at line 370 of file Exception.hpp.
◆ getDescription()
std::string sierra::ExParallel::getDescription |
( |
| ) |
const |
|
inline |
Member function getDescription returns the exception's description.
- Returns
- a std::string value of the exception's description.
Definition at line 383 of file Exception.hpp.
◆ getDescriptionStream() [1/2]
std::ostringstream& sierra::ExParallel::getDescriptionStream |
( |
| ) |
|
|
inline |
Member function getDescriptionStream returns the stream used to assemble the description.
- Returns
- a std::ostringstream reference to the exception's description stream.
Definition at line 394 of file Exception.hpp.
◆ getDescriptionStream() [2/2]
const std::ostringstream& sierra::ExParallel::getDescriptionStream |
( |
| ) |
const |
|
inline |
Member function getDescriptionStream returns the stream used to assemble the description.
- Returns
- a std::ostringstream const reference to the exception's description stream.
Definition at line 405 of file Exception.hpp.
◆ setTraceback()
ExParallel& sierra::ExParallel::setTraceback |
( |
const std::string & |
traceback | ) |
|
|
inline |
Member function setTraceback sets the exception's traceback to the caller generating the exception.
- Parameters
-
traceback | a std::string const reference to the traceback. |
- Returns
- an ExParallel reference to the exception.
Definition at line 418 of file Exception.hpp.
◆ getTraceback()
const std::string& sierra::ExParallel::getTraceback |
( |
| ) |
const |
|
inline |
Member function getTraceback returns the exception's traceback string.
- Returns
- a std::string const reference to the exception's traceback string.
Definition at line 429 of file Exception.hpp.
◆ setParallel()
ExParallel& sierra::ExParallel::setParallel |
( |
int |
parallel | ) |
|
|
inline |
Member function setParallel sets the originating processor for an exception that is being thrown in parallel.
- Parameters
-
parallel | a int value to set the originating processor for this parallel exception. |
- Returns
- an ExParallel reference to this parallel exception.
Definition at line 443 of file Exception.hpp.
◆ getParallel()
int sierra::ExParallel::getParallel |
( |
| ) |
const |
|
inline |
Member function getParallel returns the originating processor for a parallel exception or -1 if the exception was not thrown in parallel.
- Returns
- a int value of the originating processor for the parallel exception or -1.
Definition at line 455 of file Exception.hpp.
◆ isParallel()
bool sierra::ExParallel::isParallel |
( |
| ) |
const |
|
inline |
Member function isParallel returns true if the exception is being thrown in parallel.
- Returns
- a bool value of true if the exception is being thrown in parallel.
Definition at line 467 of file Exception.hpp.
◆ operator<<() [1/2]
ExParallel& sierra::ExParallel::operator<< |
( |
std::ostream &(*)(std::ostream &) |
f | ) |
|
|
inline |
Member function operator<< passes the std manipilator functions to the ExParallel object. This allows the manipulators to modify the description. (Currently in a limited fashion).
- Returns
- an ExParallel reference to this parallel exception.
Definition at line 479 of file Exception.hpp.
◆ operator<<() [2/2]
template<class U >
ExParallel& sierra::ExParallel::operator<< |
( |
const U & |
t | ) |
|
|
inline |
Member function operator<< passes any data type to the exception string class for conversion to a string.
- Parameters
-
t | a T const reference that is to be converted to a string. |
- Returns
- a ExParallel reference to this object;
Definition at line 494 of file Exception.hpp.
◆ throw_copy()
virtual void sierra::ExParallel::throw_copy |
( |
| ) |
const |
|
pure virtual |
Member function throw_copy is a pure virtual function which is allows the copying and throwing of the parallel exception using a pointer to the base exception object. This function should never return, it should throw the copied exception.
The exception is being throw in parallel so be sure to set the parallel thrown processor via setParallel(int) before throwing the copy.
Implemented in sierra::ExTemp< T >.
The documentation for this class was generated from the following files: