Utilities
Utilities header only library
Exceptions.h
1 /*
2  Copyright (C) Skeletex Research, s.r.o. - All Rights Reserved
3  Unauthorized copying of this file, via any medium is strictly prohibited
4  Proprietary and confidential
5 */
6 #ifndef UTILS_EXCEPTIONS_H
7 #define UTILS_EXCEPTIONS_H
8 
9 #include <stdexcept>
10 #include <Utils/Ulog.h>
11 
12 
13 
15 namespace std_ext
16 {
17 
18  class NotImplementedError : public std::logic_error
19  {
20  public:
21  NotImplementedError() : std::logic_error{ "Function not implemented yet." } {}
22  };
23 
24  class UnhandledConditionError : public std::logic_error
25  {
26  public:
27  UnhandledConditionError() : std::logic_error{ "Unhandled condition." } {}
28  };
29 
30  class AuthenticationError : public std::runtime_error
31  {
32  public:
33  AuthenticationError(const std::string &description) : std::runtime_error(description) {}
34  };
35 
36  class OutOfBounds : public std::out_of_range
37  {
38  public:
39  OutOfBounds(size_t x, size_t y, std::string caller)
40  : std::out_of_range("Grid element index (" + std::to_string(x) + ", " + std::to_string(y) + ") out of bounds")
41  {
42  ulog::Crash(what(), caller);
43  }
44  };
45 
46 }
47 
48 #endif /* !UTILS_EXCEPTIONS_H */
std::string to_string(const glm::vec< N, genType, glm::highp > &vec, const std::string &delim=", ")
Converts the input vector into a string with predefined delimiter.
Definition: ExtGLM.h:87
Extensions to the standard libraries.
Definition: AtomicQueue.h:11