mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 16:59:04 +00:00
Add source code for ctrtool
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#include <tc/Exception.h>
|
||||
|
||||
tc::Exception::Exception() noexcept :
|
||||
what_(""),
|
||||
module_(""),
|
||||
error_("")
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
tc::Exception::Exception(const std::string & what) noexcept :
|
||||
what_(what),
|
||||
module_(""),
|
||||
error_(what)
|
||||
{
|
||||
}
|
||||
|
||||
tc::Exception::Exception(const std::string & module, const std::string & what) noexcept :
|
||||
what_(""),
|
||||
module_(module),
|
||||
error_(what)
|
||||
{
|
||||
if (module_.length() > 0)
|
||||
{
|
||||
what_ = "[" + module_ + " ERROR] " + error_;
|
||||
}
|
||||
else
|
||||
{
|
||||
what_ = error_;
|
||||
}
|
||||
}
|
||||
|
||||
const char* tc::Exception::what() const noexcept
|
||||
{
|
||||
return what_.c_str();
|
||||
}
|
||||
|
||||
const char* tc::Exception::module() const noexcept
|
||||
{
|
||||
return module_.c_str();
|
||||
}
|
||||
|
||||
const char * tc::Exception::error() const noexcept
|
||||
{
|
||||
return error_.c_str();
|
||||
}
|
||||
Reference in New Issue
Block a user