diff options
author | kumquat-ir <66188216+kumquat-ir@users.noreply.github.com> | 2021-04-17 09:46:11 -0700 |
---|---|---|
committer | kumquat-ir <66188216+kumquat-ir@users.noreply.github.com> | 2021-04-17 09:46:11 -0700 |
commit | e668aa0f95f4f56a1ac4320f014662d279c22708 (patch) | |
tree | 7462597a5b709081b15c224d928b36018c74248f /libraries/toml11/include/toml/exception.hpp | |
parent | 13afad80fb9b17503621dc63509113203af8887c (diff) | |
download | PrismLauncher-e668aa0f95f4f56a1ac4320f014662d279c22708.tar.gz PrismLauncher-e668aa0f95f4f56a1ac4320f014662d279c22708.tar.bz2 PrismLauncher-e668aa0f95f4f56a1ac4320f014662d279c22708.zip |
switch to new toml library
Diffstat (limited to 'libraries/toml11/include/toml/exception.hpp')
-rw-r--r-- | libraries/toml11/include/toml/exception.hpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/libraries/toml11/include/toml/exception.hpp b/libraries/toml11/include/toml/exception.hpp deleted file mode 100644 index c64651d0..00000000 --- a/libraries/toml11/include/toml/exception.hpp +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright Toru Niina 2017. -// Distributed under the MIT License. -#ifndef TOML11_EXCEPTION_HPP -#define TOML11_EXCEPTION_HPP -#include <stdexcept> -#include <string> - -#include "source_location.hpp" - -namespace toml -{ - -struct exception : public std::exception -{ - public: - explicit exception(const source_location& loc): loc_(loc) {} - virtual ~exception() noexcept override = default; - virtual const char* what() const noexcept override {return "";} - virtual source_location const& location() const noexcept {return loc_;} - - protected: - source_location loc_; -}; - -struct syntax_error : public toml::exception -{ - public: - explicit syntax_error(const std::string& what_arg, const source_location& loc) - : exception(loc), what_(what_arg) - {} - virtual ~syntax_error() noexcept override = default; - virtual const char* what() const noexcept override {return what_.c_str();} - - protected: - std::string what_; -}; - -struct type_error : public toml::exception -{ - public: - explicit type_error(const std::string& what_arg, const source_location& loc) - : exception(loc), what_(what_arg) - {} - virtual ~type_error() noexcept override = default; - virtual const char* what() const noexcept override {return what_.c_str();} - - protected: - std::string what_; -}; - -struct internal_error : public toml::exception -{ - public: - explicit internal_error(const std::string& what_arg, const source_location& loc) - : exception(loc), what_(what_arg) - {} - virtual ~internal_error() noexcept override = default; - virtual const char* what() const noexcept override {return what_.c_str();} - - protected: - std::string what_; -}; - -} // toml -#endif // TOML_EXCEPTION |