OpenMoHAA
0.83.0
Loading...
Searching...
No Matches
scriptexception.h
1
/*
2
===========================================================================
3
Copyright (C) 2015 the OpenMoHAA team
4
5
This file is part of OpenMoHAA source code.
6
7
OpenMoHAA source code is free software; you can redistribute it
8
and/or modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the License,
10
or (at your option) any later version.
11
12
OpenMoHAA source code is distributed in the hope that it will be
13
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with OpenMoHAA source code; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
===========================================================================
21
*/
22
23
// scriptexception.h: Script Exception
24
25
#pragma once
26
27
#include "../corepp/str.h"
28
29
class
ScriptException
30
{
31
public
:
32
str string;
33
int
bAbort;
34
int
bIsForAnim;
35
36
private
:
37
void
CreateException(
const
char
*data);
38
39
public
:
40
ScriptException(str text);
41
ScriptException(
const
char
*format, ...);
42
ScriptException(
char
*text);
43
44
static
int
next_abort;
45
static
int
next_bIsForAnim;
46
};
47
48
void
Error(
const
char
*format, ...);
49
50
#define ScriptDeprecated(function) throw ScriptException(function ": DEPRECATED. DON'T USE IT ANYMORE")
51
#define ScriptDeprecatedAltMethod(alternative_name) \
52
gi.DPrintf("WARNING: %s: is deprecated and has been superseded by the " alternative_name " method\n", __FUNCTION__)
53
#define ScriptDeprecatedAltVariable(alternative_name) \
54
gi.DPrintf( \
55
"WARNING: %s: is deprecated and has been superseded by the " alternative_name " variable\n", __FUNCTION__ \
56
)
57
#define ScriptError throw ScriptException
code
script
scriptexception.h
Generated by
1.13.2