Improve runtime error handling
This commit is contained in:
@@ -1,27 +1,44 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace Execute
|
||||
{
|
||||
struct RuntimeError
|
||||
class RuntimeError
|
||||
{
|
||||
protected:
|
||||
std::string message;
|
||||
|
||||
public:
|
||||
std::string const & GetMessage() const;
|
||||
|
||||
RuntimeError();
|
||||
RuntimeError(std::string const & what);
|
||||
};
|
||||
|
||||
struct StackUnderflow : RuntimeError
|
||||
class StackUnderflow : public RuntimeError
|
||||
{
|
||||
|
||||
public:
|
||||
StackUnderflow();
|
||||
};
|
||||
|
||||
struct StackOverflow : RuntimeError
|
||||
class StackOverflow : public RuntimeError
|
||||
{
|
||||
public:
|
||||
StackOverflow();
|
||||
};
|
||||
|
||||
class MissingLabel : public RuntimeError
|
||||
{
|
||||
public:
|
||||
MissingLabel(std::string const & label);
|
||||
};
|
||||
|
||||
namespace Internal
|
||||
{
|
||||
struct BadValueType : RuntimeError
|
||||
class BadValueType : public RuntimeError
|
||||
{
|
||||
|
||||
public:
|
||||
BadValueType();
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user