MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / interrupt_exception

Class interrupt_exception

inst/examples/OpenMP/piWithInterrupts.cpp:15–43  ·  view source on GitHub ↗

* Base class for interrupt exceptions thrown when user * interrupts are detected. */

Source from the content-addressed store, hash-verified

13 * interrupts are detected.
14 */
15class interrupt_exception : public std::exception {
16public:
17 /**
18 * Constructor.
19 * @param[in] message A description of event that
20 * caused this exception.
21 */
22 interrupt_exception(std::string message)
23 : detailed_message(message)
24 {};
25
26 /**
27 * Virtual destructor. Needed to avoid "looser throw specification" errors.
28 */
29 virtual ~interrupt_exception() throw() {};
30
31 /**
32 * Obtain a description of the exception.
33 * @return Description.
34 */
35 virtual const char* what() const throw() {
36 return detailed_message.c_str();
37 }
38
39 /**
40 * String with details on the error.
41 */
42 std::string detailed_message;
43};
44
45/**
46 * Do the actual check for an interrupt.

Callers 1

PiLeibnizFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected