Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[6893b5]: libutil++ / op_exception.cpp Maximize Restore History

Download this file

op_exception.cpp    65 lines (51 with data), 952 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* @file op_exception.cpp
* exception base class
*
* @remark Copyright 2003 OProfile authors
* @remark Read the file COPYING
*
* @author Philippe Elie
* @author John Levon
*/
#include <cstring>
#include "op_exception.h"
using namespace std;
op_exception::op_exception(string const & msg)
:
message(msg)
{
}
op_exception::~op_exception() throw()
{
}
char const * op_exception::what() const throw()
{
return message.c_str();
}
op_no_samples_exception::op_no_samples_exception(string const & msg)
:
op_exception(msg)
{
}
op_no_samples_exception::~op_no_samples_exception(void) throw()
{
}
op_fatal_error::op_fatal_error(string const & msg)
:
op_exception(msg)
{
}
op_runtime_error::op_runtime_error(string const & msg)
:
runtime_error(msg)
{
}
op_runtime_error::op_runtime_error(string const & msg, int cerrno)
:
runtime_error(msg + "\ncause: " + strerror(cerrno))
{
}
op_runtime_error::~op_runtime_error() throw()
{
}