X-Git-Url: https://git.ucc.asn.au/?p=tpg%2Facess2.git;a=blobdiff_plain;f=Usermode%2FLibraries%2Flibc%2B%2B.so_src%2Fexceptions.cc;fp=Usermode%2FLibraries%2Flibc%2B%2B.so_src%2Fexceptions.cc;h=cc7c8c27558fb6a9b6acf3deceba3e0b175ea1a5;hp=0000000000000000000000000000000000000000;hb=845b6f9d90bb87b5e760e4d49aa93b0e003ab750;hpb=67a7fe2bb79eceaf10c572a99bd8345c4e81cf5b diff --git a/Usermode/Libraries/libc++.so_src/exceptions.cc b/Usermode/Libraries/libc++.so_src/exceptions.cc new file mode 100644 index 00000000..cc7c8c27 --- /dev/null +++ b/Usermode/Libraries/libc++.so_src/exceptions.cc @@ -0,0 +1,79 @@ +/* + * Acess2 C++ Library + * - By John Hodge (thePowersGang) + * + * exceptions.cc + * - exception and friends + */ +#include +#include +#include +#include + +// === CODE === +namespace std { + +exception::exception() throw() +{ +} +exception::exception(const exception&) throw() +{ +} +exception& exception::operator=(const exception&) throw() +{ + return *this; +} +exception::~exception() throw() +{ +} +const char* exception::what() const throw() +{ + return "generic exception"; +} + +void terminate() +{ + _SysDebug("terminate()"); + _exit(0); +} + +_bits::str_except::str_except(const string& what_arg): + m_str(what_arg) +{ +} +_bits::str_except::~str_except() noexcept +{ +} +_bits::str_except& _bits::str_except::operator=(const str_except& e) noexcept +{ + m_str = e.m_str; + return *this; +} +const char* _bits::str_except::what() const throw() +{ + return m_str.c_str(); +} + +// --- Standar Exceptions --- +logic_error::logic_error(const string& what_str): + _bits::str_except(what_str) +{ +} + +out_of_range::out_of_range(const string& what_str): + logic_error(what_str) +{ +} + +length_error::length_error(const string& what_str): + logic_error(what_str) +{ +} + +runtime_error::runtime_error(const string& what_str): + _bits::str_except(what_str) +{ +} + +} // namespace std +