Initial Commit
This commit is contained in:
18
include/pd/Error.hpp
Normal file
18
include/pd/Error.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Palladium {
|
||||
void Error(const std::string& msg);
|
||||
inline void InlineError(const std::string& msg) {
|
||||
std::string location = __FILE__ + std::string(":") + std::to_string(__LINE__);
|
||||
Error("Error: \n" + location + "\n" + msg);
|
||||
}
|
||||
inline void InlineAssert(bool v, const std::string& msg) {
|
||||
if (v == false) {
|
||||
std::string location =
|
||||
__FILE__ + std::string(":") + std::to_string(__LINE__);
|
||||
Error("Assert Failed:\n" + location + "\n" + msg);
|
||||
}
|
||||
}
|
||||
} // namespace Palladium
|
||||
Reference in New Issue
Block a user