Blender V5.0
GHOST_XrException.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2002-2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <exception>
12#include <string>
13
14class GHOST_XrException : public std::exception {
15 friend class GHOST_XrContext;
16
17 public:
18 GHOST_XrException(const char *msg, int result = 0) : std::exception(), msg_(msg), result_(result)
19 {
20 }
21
22 const char *what() const noexcept override
23 {
24 return msg_.data();
25 }
26
27 private:
28 std::string msg_;
29 int result_;
30};
const char * what() const noexcept override
friend class GHOST_XrContext
GHOST_XrException(const char *msg, int result=0)