593ce3addca7b9c9d60f9e7f07e7bf6b22d54968
[tpg/acess2.git] / Usermode / Libraries / libc++.so_src / exceptions.cc
1 /*
2  * Acess2 C++ Library
3  * - By John Hodge (thePowersGang)
4  *
5  * exceptions.cc
6  * - ::std::exception and friends
7  */
8 #include <string>
9 #include <exception>
10 #include <stdexcept>
11 #include <acess/sys.h>
12
13 // === CODE ===
14 ::std::exception::exception() throw():
15         m_what_str("-empty-")
16 {
17 }
18 ::std::exception::exception(const exception& other) throw():
19         m_what_str(other.m_what_str)
20 {
21 }
22 ::std::exception::exception(const string& str) throw():
23         m_what_str(str)
24 {
25 }
26 ::std::exception& ::std::exception::operator=(const exception& other) throw()
27 {
28         m_what_str = other.m_what_str;
29         return *this;
30 }
31 ::std::exception::~exception() throw()
32 {
33 }
34 const char* ::std::exception::what() const throw()
35 {
36         return m_what_str.c_str();
37 }
38
39 void ::std::terminate()
40 {
41         _exit(0);
42 }
43
44 // --- Standar Exceptions ---
45 ::std::logic_error::logic_error(const ::std::string& what_str):
46         exception(what_str)
47 {
48 }
49
50 ::std::out_of_range::out_of_range(const ::std::string& what_str):
51         logic_error(what_str)
52 {
53 }

UCC git Repository :: git.ucc.asn.au