blob: 49880471407d21566fc5cc7c42c85b1db865bb82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <stdexcept>
#include "SignalCatch.h"
using namespace crepe;
using namespace std;
SignalCatch::SignalCatch() {
segvcatch::init_segv(&SignalCatch::segv);
segvcatch::init_fpe(&SignalCatch::fpe);
}
SignalCatch::~SignalCatch() {
segvcatch::init_segv();
segvcatch::init_fpe();
}
void SignalCatch::segv() { throw runtime_error("segmentation fault"); }
void SignalCatch::fpe() { throw domain_error("floating point exception"); }
|