42 lines
1.0 KiB
C++
42 lines
1.0 KiB
C++
#pragma once
|
|
#include <string>
|
|
|
|
namespace Execute
|
|
{
|
|
class RuntimeError {
|
|
protected:
|
|
std::string message;
|
|
std::size_t byteLocation;
|
|
|
|
public:
|
|
std::string const & GetMessage() const;
|
|
|
|
RuntimeError();
|
|
RuntimeError(std::string const & what, std::size_t const byteLocation);
|
|
};
|
|
|
|
class InterruptIndexOutOfRange : public RuntimeError {
|
|
public:
|
|
InterruptIndexOutOfRange(std::size_t const location, int const index);
|
|
};
|
|
|
|
class AttemptedWriteToImmediate : public RuntimeError {
|
|
public:
|
|
AttemptedWriteToImmediate(std::size_t const location);
|
|
};
|
|
|
|
class NonExecutableInstruction : public RuntimeError {
|
|
public:
|
|
NonExecutableInstruction(std::size_t const location);
|
|
};
|
|
|
|
class NonArgumentByte : public RuntimeError {
|
|
public:
|
|
NonArgumentByte(std::size_t const location);
|
|
};
|
|
|
|
class OutOfMemory : public RuntimeError {
|
|
public:
|
|
OutOfMemory(std::size_t const requiredMemorySize, std::size_t const actualMemorySize);
|
|
};
|
|
} |