Move to strongly typed algebraic enum

This commit is contained in:
Jason Turner
2016-04-09 21:50:23 -06:00
parent 641ac1a1ae
commit 08a68f310a
4 changed files with 159 additions and 147 deletions

View File

@@ -98,6 +98,18 @@ namespace chaiscript
/// \brief Classes which may be thrown during error cases when ChaiScript is executing.
namespace exception
{
/// \brief Thrown if an error occurs while attempting to load a binary module
struct load_module_error : std::runtime_error
{
load_module_error(const std::string &t_reason) noexcept
: std::runtime_error(t_reason)
{
}
load_module_error(const load_module_error &) = default;
virtual ~load_module_error() noexcept {}
};
/// Errors generated during parsing or evaluation
struct eval_error : std::runtime_error {