Fleet  0.0.9
Inference in the LOT
Errors.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <exception>
4 #include <stdexcept>
5 #include <string>
6 
7 class NotImplementedError : public std::logic_error {
8 public:
9 
10  NotImplementedError() : std::logic_error("*** Function not yet implemented.") { }
11  NotImplementedError(std::string s) : std::logic_error(s) { }
12 
13  virtual char const* what() const noexcept override {
14  return "*** Function not yet implemented.";
15  }
16 };
17 
18 class YouShouldNotBeHereError : public std::logic_error {
19 public:
20 
21  YouShouldNotBeHereError() : std::logic_error("*** You got a YouShouldNotBeHereError.") { }
22 
23  YouShouldNotBeHereError(std::string s) : std::logic_error(s) { }
24 
25 
26  virtual char const* what() const noexcept override {
27  return "*** It was a mistake to call this.";
28  }
29 };
30 
NotImplementedError()
Definition: Errors.h:10
NotImplementedError(std::string s)
Definition: Errors.h:11
Definition: Errors.h:18
virtual char const * what() const noexcept override
Definition: Errors.h:26
virtual char const * what() const noexcept override
Definition: Errors.h:13
Definition: Errors.h:7
YouShouldNotBeHereError()
Definition: Errors.h:21
YouShouldNotBeHereError(std::string s)
Definition: Errors.h:23