Usermode/libc++ - Exception handling in progress (build broken)
[tpg/acess2.git] / Usermode / Libraries / libc++.so_src / exceptions.cc
diff --git a/Usermode/Libraries/libc++.so_src/exceptions.cc b/Usermode/Libraries/libc++.so_src/exceptions.cc
new file mode 100644 (file)
index 0000000..2b66dce
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Acess2 C++ Library
+ * - By John Hodge (thePowersGang)
+ *
+ * exceptions.cc
+ * - ::std::exception and friends
+ */
+#include <string>
+#include <exception>
+#include <stdexcept>
+
+// === CODE ===
+::std::exception::exception() throw():
+       m_what_str("-empty-")
+{
+}
+::std::exception::exception(const exception& other) throw():
+       m_what_str(other.m_what_str)
+{
+}
+::std::exception::exception(const string& str) throw():
+       m_what_str(str)
+{
+}
+::std::exception& ::std::exception::operator=(const exception& other) throw()
+{
+       m_what_str = other.m_what_str;
+       return *this;
+}
+::std::exception::~exception() throw()
+{
+}
+const char* ::std::exception::what() const throw()
+{
+       return m_what_str.c_str();
+}
+
+::std::logic_error::logic_error(const ::std::string& what_str):
+       exception(what_str)
+{
+}
+
+::std::out_of_range::out_of_range(const ::std::string& what_str):
+       logic_error(what_str)
+{
+}

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