mirror of
https://github.com/zeldaret/st
synced 2026-06-29 03:10:53 -04:00
Decompile overlay 1 (Part 2) (#91)
* UnkStruct_027e09b8_001 OK * match func_ov001_020b7830 * fix build issues * UnkStruct_027e0cd8_001 49% * UnkStruct_027e0cd8_001 OK * fix build issues * UnkStruct_027e0cd8_0C_001 92% * port some MSL C++ headers from rb3 and key decomps * fix build issues * UnkStruct_027e0cd8_0C_001 98%
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
#ifndef _STD_STDEXCEPT
|
||||
#define _STD_STDEXCEPT
|
||||
|
||||
// from rb3 decomp
|
||||
|
||||
#include "shared_ptr.hpp"
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
#include <new>
|
||||
|
||||
namespace std {
|
||||
|
||||
class logic_error : public exception {
|
||||
public:
|
||||
explicit logic_error(const char *what_arg) :
|
||||
m_What(new char[strlen(what_arg) + 1]) {}
|
||||
|
||||
virtual const char *what() const {
|
||||
return (char *)m_What.get();
|
||||
}
|
||||
|
||||
private:
|
||||
detail::shared_ptr<char[]> m_What;
|
||||
};
|
||||
|
||||
class runtime_error : public exception {
|
||||
public:
|
||||
explicit runtime_error(const char *what_arg) :
|
||||
m_What(new char[strlen(what_arg) + 1]) {}
|
||||
|
||||
virtual const char *what() const {
|
||||
return m_What.get();
|
||||
}
|
||||
|
||||
private:
|
||||
detail::shared_ptr<char[]> m_What;
|
||||
};
|
||||
|
||||
class domain_error : public logic_error {
|
||||
public:
|
||||
explicit domain_error(const char *what_arg) :
|
||||
logic_error(what_arg) {}
|
||||
};
|
||||
|
||||
class invalid_argument : public logic_error {
|
||||
public:
|
||||
explicit invalid_argument(const char *what_arg) :
|
||||
logic_error(what_arg) {}
|
||||
};
|
||||
|
||||
class length_error : public logic_error {
|
||||
public:
|
||||
explicit length_error(const char *what_arg) :
|
||||
logic_error(what_arg) {}
|
||||
};
|
||||
|
||||
class out_of_range : public logic_error {
|
||||
public:
|
||||
explicit out_of_range(const char *what_arg) :
|
||||
logic_error(what_arg) {}
|
||||
};
|
||||
|
||||
class range_error : public runtime_error {
|
||||
public:
|
||||
explicit range_error(const char *what_arg) :
|
||||
runtime_error(what_arg) {}
|
||||
};
|
||||
|
||||
class overflow_error : public runtime_error {
|
||||
public:
|
||||
explicit overflow_error(const char *what_arg) :
|
||||
runtime_error(what_arg) {}
|
||||
};
|
||||
|
||||
class underflow_error : public runtime_error {
|
||||
public:
|
||||
explicit underflow_error(const char *what_arg) :
|
||||
runtime_error(what_arg) {}
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user