Blender V5.0
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
11
12#include "MEM_guardedalloc.h"
13
14namespace Freestyle {
15
16class Exception {
17 public:
22
23 static int getException()
24 {
25 exception_type e = _exception;
26 _exception = NO_EXCEPTION;
27 return e;
28 }
29
30 static int raiseException(exception_type exception = UNDEFINED)
31 {
32 _exception = exception;
33 return _exception;
34 }
35
36 static void reset()
37 {
38 _exception = NO_EXCEPTION;
39 }
40
41 private:
42 static exception_type _exception;
43
44 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Exception")
45};
46
47} /* namespace Freestyle */
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static void reset()
Definition Exception.h:36
static int getException()
Definition Exception.h:23
static int raiseException(exception_type exception=UNDEFINED)
Definition Exception.h:30
inherits from class Rep
Definition AppCanvas.cpp:20