General Exception class for Profiling code
| 47 | |
| 48 | /// General Exception class for Profiling code |
| 49 | class ProfilingException : public std::exception |
| 50 | { |
| 51 | public: |
| 52 | explicit ProfilingException(const std::string& message) : m_Message(message) {}; |
| 53 | |
| 54 | explicit ProfilingException(const std::string& message, |
| 55 | const Location& location) : m_Message(message + location.AsString()) {}; |
| 56 | |
| 57 | /// @return - Error message of ProfilingException |
| 58 | virtual const char *what() const noexcept override |
| 59 | { |
| 60 | return m_Message.c_str(); |
| 61 | } |
| 62 | |
| 63 | private: |
| 64 | std::string m_Message; |
| 65 | }; |
| 66 | |
| 67 | class BackendProfilingException : public ProfilingException |
| 68 | { |
no outgoing calls