diff options
Diffstat (limited to 'linden/indra/lscript/lscript_compile/lscript_error.cpp')
-rw-r--r-- | linden/indra/lscript/lscript_compile/lscript_error.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/linden/indra/lscript/lscript_compile/lscript_error.cpp b/linden/indra/lscript/lscript_compile/lscript_error.cpp index b3c1ffa..3b92bca 100644 --- a/linden/indra/lscript/lscript_compile/lscript_error.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_error.cpp | |||
@@ -49,13 +49,13 @@ void LLScriptFilePosition::fdotabs(LLFILE *fp, S32 tabs, S32 tabsize) | |||
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | char* gWarningText[LSWARN_EOF] = /*Flawfinder: ignore*/ | 52 | const char* gWarningText[LSWARN_EOF] = /*Flawfinder: ignore*/ |
53 | { | 53 | { |
54 | "INVALID", | 54 | "INVALID", |
55 | "Dead code found beyond return statement" | 55 | "Dead code found beyond return statement" |
56 | }; | 56 | }; |
57 | 57 | ||
58 | char* gErrorText[LSERROR_EOF] = /*Flawfinder: ignore*/ | 58 | const char* gErrorText[LSERROR_EOF] = /*Flawfinder: ignore*/ |
59 | { | 59 | { |
60 | "INVALID", | 60 | "INVALID", |
61 | "Syntax error", | 61 | "Syntax error", |
@@ -72,7 +72,10 @@ char* gErrorText[LSERROR_EOF] = /*Flawfinder: ignore*/ | |||
72 | "Use of vector or quaternion method on incorrect type", | 72 | "Use of vector or quaternion method on incorrect type", |
73 | "Lists can't be included in lists", | 73 | "Lists can't be included in lists", |
74 | "Unitialized variables can't be included in lists", | 74 | "Unitialized variables can't be included in lists", |
75 | "Declaration requires a new scope -- use { and }" | 75 | "Declaration requires a new scope -- use { and }", |
76 | "CIL assembler failed", | ||
77 | "Bytecode transformer failed", | ||
78 | "Bytecode verification failed" | ||
76 | }; | 79 | }; |
77 | 80 | ||
78 | void LLScriptGenerateErrorText::writeWarning(LLFILE *fp, LLScriptFilePosition *pos, LSCRIPTWarnings warning) | 81 | void LLScriptGenerateErrorText::writeWarning(LLFILE *fp, LLScriptFilePosition *pos, LSCRIPTWarnings warning) |
@@ -98,3 +101,8 @@ void LLScriptGenerateErrorText::writeError(LLFILE *fp, S32 line, S32 col, LSCRIP | |||
98 | fprintf(fp, "(%d, %d) : ERROR : %s\n", line, col, gErrorText[error]); | 101 | fprintf(fp, "(%d, %d) : ERROR : %s\n", line, col, gErrorText[error]); |
99 | mTotalErrors++; | 102 | mTotalErrors++; |
100 | } | 103 | } |
104 | |||
105 | std::string getLScriptErrorString(LSCRIPTErrors error) | ||
106 | { | ||
107 | return gErrorText[error]; | ||
108 | } | ||