aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llerrorlegacy.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llerrorlegacy.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llerrorlegacy.h b/linden/indra/llcommon/llerrorlegacy.h
new file mode 100644
index 0000000..5438a21
--- /dev/null
+++ b/linden/indra/llcommon/llerrorlegacy.h
@@ -0,0 +1,117 @@
1/**
2 * @file llerrorlegacy.h
3 * @date January 2007
4 * @brief old things from the older error system
5 *
6 * Copyright (c) 2007-2007, Linden Research, Inc.
7 *
8 * The source code in this file ("Source Code") is provided by Linden Lab
9 * to you under the terms of the GNU General Public License, version 2.0
10 * ("GPL"), unless you have obtained a separate licensing agreement
11 * ("Other License"), formally executed by you and Linden Lab. Terms of
12 * the GPL can be found in doc/GPL-license.txt in this distribution, or
13 * online at http://secondlife.com/developers/opensource/gplv2
14 *
15 * There are special exceptions to the terms and conditions of the GPL as
16 * it is applied to this Source Code. View the full text of the exception
17 * in the file doc/FLOSS-exception.txt in this software distribution, or
18 * online at http://secondlife.com/developers/opensource/flossexception
19 *
20 * By copying, modifying or distributing this software, you acknowledge
21 * that you have read and understood your obligations described above,
22 * and agree to abide by those obligations.
23 *
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE.
27 */
28
29#ifndef LL_LLERRORLEGACY_H
30#define LL_LLERRORLEGACY_H
31
32
33
34/*
35 LEGACY -- DO NOT USE THIS STUFF ANYMORE
36*/
37
38// Specific error codes
39const int LL_ERR_NOERR = 0;
40const int LL_ERR_ASSET_REQUEST_FAILED = -1;
41//const int LL_ERR_ASSET_REQUEST_INVALID = -2;
42const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3;
43const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4;
44const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5;
45const int LL_ERR_EOF = -39;
46const int LL_ERR_CANNOT_OPEN_FILE = -42;
47const int LL_ERR_FILE_NOT_FOUND = -43;
48const int LL_ERR_FILE_EMPTY = -44;
49const int LL_ERR_TCP_TIMEOUT = -23016;
50const int LL_ERR_CIRCUIT_GONE = -23017;
51
52
53
54// Define one of these for different error levels in release...
55// #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output.
56#define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output
57#define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output.
58
59
60//////////////////////////////////////////
61//
62// Implementation - ignore
63//
64//
65#ifdef _DEBUG
66#define SHOW_DEBUG
67#define SHOW_WARN
68#define SHOW_INFO
69#define SHOW_ASSERT
70#else // _DEBUG
71
72#ifdef RELEASE_SHOW_DEBUG
73#define SHOW_DEBUG
74#endif
75
76#ifdef RELEASE_SHOW_WARN
77#define SHOW_WARN
78#endif
79
80#ifdef RELEASE_SHOW_INFO
81#define SHOW_INFO
82#endif
83
84#ifdef RELEASE_SHOW_ASSERT
85#define SHOW_ASSERT
86#endif
87
88#endif // _DEBUG
89
90
91
92#define lldebugst(type) lldebugs
93#define llendflush llendl
94
95
96#define llerror(msg, num) llerrs << "Error # " << num << ": " << msg << llendl;
97
98#define llwarning(msg, num) llwarns << "Warning # " << num << ": " << msg << llendl;
99
100#ifdef SHOW_ASSERT
101#define llassert(func) if (!(func)) llerrs << "ASSERT (" << #func << ")" << llendl;
102#else
103#define llassert(func)
104#endif
105#define llassert_always(func) if (!(func)) llerrs << "ASSERT (" << #func << ")" << llendl;
106
107#ifdef SHOW_ASSERT
108#define llverify(func) if (!(func)) llerrs << "ASSERT (" << #func << ")" << llendl;
109#else
110#define llverify(func) (func); // get rid of warning C4189
111#endif
112
113// handy compile-time assert - enforce those template parameters!
114#define cassert(expn) typedef char __C_ASSERT__[(expn)?1:-1] /* Flawfinder: ignore */
115 //XXX: used in two places in llcommon/llskipmap.h
116
117#endif // LL_LLERRORLEGACY_H