[go: up one dir, main page]

Menu

[8bf46b]: / common / exceptions.h  Maximize  Restore  History

Download this file

51 lines (43 with data), 1.2 kB

 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
/***************************************************************************
* debug.h
*
* Thu Oct 26 18:16:00 2006
* Copyright 2006 Roman Dementiev
* Email dementiev@ira.uka.de
****************************************************************************/
#ifndef STXXL_EXCEPTIONS_H_
#define STXXL_EXCEPTIONS_H_
#include <iostream>
#include <string>
#include <stdexcept>
#include "../common/utils.h"
__STXXL_BEGIN_NAMESPACE
class io_error : public std::ios_base::failure
{
public:
io_error () throw(): std::ios_base::failure("") {}
io_error (const std::string & msg_) throw():
std::ios_base::failure(msg_)
{
}
};
class resource_error : public std::runtime_error
{
public:
resource_error () throw(): std::runtime_error("") {}
resource_error (const std::string & msg_) throw():
std::runtime_error(msg_)
{
}
};
class bad_ext_alloc : public std::runtime_error
{
public:
bad_ext_alloc () throw(): std::runtime_error("") {}
bad_ext_alloc (const std::string & msg_) throw():
std::runtime_error(msg_)
{
}
};
__STXXL_END_NAMESPACE
#endif /* STXXL_EXCEPTIONS_H_*/