12#ifndef INCLUDE_ARK_EXCEPTIONS_HPP
13#define INCLUDE_ARK_EXCEPTIONS_HPP
32 std::runtime_error(message)
45 "ZeroDivisionError: In ordonary arithmetic, the expression has no meaning, "
46 "as there is no number which, when multiplied by 0, gives a (assuming a != 0), "
47 "and so division by zero is undefined. Since any number multiplied by 0 is 0, "
48 "the expression 0/0 is also undefined.")
61 "PowError: Can not pow the given number (a) to the given exponent (b) because "
62 "a^b, with b being a member of the rational numbers, isn't supported.")
74 std::runtime_error(
"AssertionFailed: " + message)
86 std::runtime_error(
"SyntaxError: " + message)
98 std::runtime_error(
"ParseError: " + message)
110 std::runtime_error(
"OptimizerError: " + message)
122 std::runtime_error(
"MacroProcessingError: " + message)
134 std::runtime_error(
"CompilationError: " + message)
An assertion error, only triggered from ArkScript code through (assert expr error-message)
AssertionFailed(const std::string &message)
CompilationError thrown by the compiler.
CompilationError(const std::string &message)
MacroProcessingError thrown by the compiler.
MacroProcessingError(const std::string &message)
OptimizerError thrown by the AST optimizer.
OptimizerError(const std::string &message)
ParseError thrown by the parser.
ParseError(const std::string &message)
A pow error triggered when we can't do a pow b.
SyntaxError thrown by the lexer.
SyntaxError(const std::string &message)
A type error triggered when types don't match.
TypeError(const std::string &message)
A special zero division error triggered when a number is divided by 0.