diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/llcommon/llerrorlegacy.h | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/llcommon/llerrorlegacy.h')
-rw-r--r-- | linden/indra/llcommon/llerrorlegacy.h | 117 |
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 | ||
39 | const int LL_ERR_NOERR = 0; | ||
40 | const int LL_ERR_ASSET_REQUEST_FAILED = -1; | ||
41 | //const int LL_ERR_ASSET_REQUEST_INVALID = -2; | ||
42 | const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3; | ||
43 | const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4; | ||
44 | const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5; | ||
45 | const int LL_ERR_EOF = -39; | ||
46 | const int LL_ERR_CANNOT_OPEN_FILE = -42; | ||
47 | const int LL_ERR_FILE_NOT_FOUND = -43; | ||
48 | const int LL_ERR_FILE_EMPTY = -44; | ||
49 | const int LL_ERR_TCP_TIMEOUT = -23016; | ||
50 | const 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 | ||