44 lines
714 B
C++
44 lines
714 B
C++
#include <execute/error.hpp>
|
|
|
|
namespace Execute
|
|
{
|
|
std::string const & RuntimeError::GetMessage() const
|
|
{
|
|
return message;
|
|
}
|
|
|
|
RuntimeError::RuntimeError()
|
|
: message("Undocumented runtime error")
|
|
{
|
|
}
|
|
|
|
RuntimeError::RuntimeError(std::string const & what)
|
|
: message(what)
|
|
{
|
|
}
|
|
|
|
StackUnderflow::StackUnderflow()
|
|
: RuntimeError("Stack underflow error")
|
|
{
|
|
}
|
|
|
|
StackOverflow::StackOverflow()
|
|
: RuntimeError("Stack overflow error")
|
|
{
|
|
}
|
|
|
|
MissingLabel::MissingLabel(std::string const & label)
|
|
{
|
|
message = "Missing jump/function label \"";
|
|
message += label;
|
|
message += '"';
|
|
}
|
|
|
|
namespace Internal
|
|
{
|
|
BadValueType::BadValueType()
|
|
: RuntimeError("Internal error: bad value type")
|
|
{
|
|
}
|
|
}
|
|
} |