Blender V4.3
Exception.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
12#ifdef WITH_CXX_GUARDEDALLOC
13# include "MEM_guardedalloc.h"
14#endif
15
16namespace Freestyle {
17
18class Exception {
19 public:
24
25 static int getException()
26 {
27 exception_type e = _exception;
28 _exception = NO_EXCEPTION;
29 return e;
30 }
31
32 static int raiseException(exception_type exception = UNDEFINED)
33 {
34 _exception = exception;
35 return _exception;
36 }
37
38 static void reset()
39 {
40 _exception = NO_EXCEPTION;
41 }
42
43 private:
44 static exception_type _exception;
45
46#ifdef WITH_CXX_GUARDEDALLOC
47 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Exception")
48#endif
49};
50
51} /* namespace Freestyle */
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static void reset()
Definition Exception.h:38
static int getException()
Definition Exception.h:25
static int raiseException(exception_type exception=UNDEFINED)
Definition Exception.h:32
inherits from class Rep
Definition AppCanvas.cpp:20