Files
test/intern/ghost/intern/GHOST_XrException.hh
2023-04-06 08:29:57 +10:00

30 lines
474 B
C++

/* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup GHOST
*/
#pragma once
#include <exception>
#include <string>
class GHOST_XrException : public std::exception {
friend class GHOST_XrContext;
public:
GHOST_XrException(const char *msg, int result = 0)
: std::exception(), m_msg(msg), m_result(result)
{
}
const char *what() const noexcept override
{
return m_msg.data();
}
private:
std::string m_msg;
int m_result;
};