ArkScript
A small, fast, functional and scripting language for video games
|
ArkScript homemade exceptions. More...
#include <string>
#include <vector>
#include <stdexcept>
#include <optional>
#include <ostream>
#include <iostream>
#include <Ark/Compiler/AST/utf8_char.hpp>
#include <Ark/Platform.hpp>
Go to the source code of this file.
Classes | |
class | Ark::Error |
class | Ark::TypeError |
A type error triggered when types don't match. More... | |
class | Ark::ZeroDivisionError |
A special zero division error triggered when a number is divided by 0. More... | |
class | Ark::AssertionFailed |
An assertion error, only triggered from ArkScript code through (assert expr error-message) More... | |
struct | Ark::CodeError |
CodeError thrown by the compiler (parser, macro processor, optimizer, and compiler itself) More... | |
Namespaces | |
namespace | Ark |
namespace | Ark::internal |
namespace | Ark::Diagnostics |
Functions | |
ARK_API void | Ark::Diagnostics::makeContext (std::ostream &os, const std::string &code, std::size_t target_line, std::size_t col_start, std::size_t sym_size) |
Helper to create a colorized context to report errors to the user. | |
ARK_API std::string | Ark::Diagnostics::makeContextWithNode (const std::string &message, const internal::Node &node) |
Helper used by the compiler to generate a colorized context from a node. | |
ARK_API void | Ark::Diagnostics::generate (const CodeError &e, std::string code="", std::ostream &os=std::cout) |
Generate a diagnostic from an error and print it to the standard output. | |
ArkScript homemade exceptions.
Definition in file Exceptions.hpp.