llerrorlegacy.h

Go to the documentation of this file.
00001 
00033 #ifndef LL_LLERRORLEGACY_H
00034 #define LL_LLERRORLEGACY_H
00035 
00036 
00037 
00038 /*
00039         LEGACY -- DO NOT USE THIS STUFF ANYMORE
00040 */
00041 
00042 // Specific error codes
00043 const int LL_ERR_NOERR = 0;
00044 const int LL_ERR_ASSET_REQUEST_FAILED = -1;
00045 //const int LL_ERR_ASSET_REQUEST_INVALID = -2;
00046 const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3;
00047 const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4;
00048 const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5;
00049 const int LL_ERR_EOF = -39;
00050 const int LL_ERR_CANNOT_OPEN_FILE = -42;
00051 const int LL_ERR_FILE_NOT_FOUND = -43;
00052 const int LL_ERR_FILE_EMPTY     = -44;
00053 const int LL_ERR_TCP_TIMEOUT    = -23016;
00054 const int LL_ERR_CIRCUIT_GONE   = -23017;
00055 
00056 
00057 
00058 // Define one of these for different error levels in release...
00059 // #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output.
00060 #define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output
00061 #define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output.
00062 
00063 
00065 //
00066 //  Implementation - ignore
00067 //
00068 //
00069 #ifdef _DEBUG
00070 #define SHOW_DEBUG
00071 #define SHOW_WARN
00072 #define SHOW_INFO
00073 #define SHOW_ASSERT
00074 #else // _DEBUG
00075 
00076 #ifdef RELEASE_SHOW_DEBUG
00077 #define SHOW_DEBUG
00078 #endif
00079 
00080 #ifdef RELEASE_SHOW_WARN
00081 #define SHOW_WARN
00082 #endif
00083 
00084 #ifdef RELEASE_SHOW_INFO
00085 #define SHOW_INFO
00086 #endif
00087 
00088 #ifdef RELEASE_SHOW_ASSERT
00089 #define SHOW_ASSERT
00090 #endif
00091 
00092 #endif // _DEBUG
00093 
00094 
00095 
00096 #define lldebugst(type)                 lldebugs
00097 #define llendflush                              llendl
00098 
00099 
00100 #define llerror(msg, num)               llerrs << "Error # " << num << ": " << msg << llendl;
00101 
00102 #define llwarning(msg, num)             llwarns << "Warning # " << num << ": " << msg << llendl;
00103 
00104 #ifdef SHOW_ASSERT
00105 #define llassert(func)                  if (!(func)) llerrs << "ASSERT (" << #func << ")" << llendl;
00106 #else
00107 #define llassert(func)
00108 #endif
00109 #define llassert_always(func)   if (!(func)) llerrs << "ASSERT (" << #func << ")" << llendl;
00110 
00111 #ifdef SHOW_ASSERT
00112 #define llverify(func)                  if (!(func)) llerrs << "ASSERT (" << #func << ")" << llendl;
00113 #else
00114 #define llverify(func)                  (func); // get rid of warning C4189
00115 #endif
00116 
00117 // handy compile-time assert - enforce those template parameters! 
00118 #define cassert(expn) typedef char __C_ASSERT__[(expn)?1:-1]   /* Flawfinder: ignore */
00119         //XXX: used in two places in llcommon/llskipmap.h
00120 
00121 #endif // LL_LLERRORLEGACY_H

Generated on Thu Jul 1 06:08:29 2010 for Second Life Viewer by  doxygen 1.4.7