| 1075 | //========================================================================== |
| 1076 | |
| 1077 | void FScanner::ScriptError (const char *message, ...) |
| 1078 | { |
| 1079 | FString composed; |
| 1080 | |
| 1081 | if (message == NULL) |
| 1082 | { |
| 1083 | composed = "Bad syntax."; |
| 1084 | } |
| 1085 | else |
| 1086 | { |
| 1087 | va_list arglist; |
| 1088 | va_start (arglist, message); |
| 1089 | composed.VFormat (message, arglist); |
| 1090 | va_end (arglist); |
| 1091 | } |
| 1092 | |
| 1093 | ParseError = true; |
| 1094 | if (NoFatalErrors) |
| 1095 | { |
| 1096 | Printf(TEXTCOLOR_RED "%sScript error, \"%s\"" TEXTCOLOR_RED " line %d:\n" TEXTCOLOR_RED "%s\n", PrependMessage.GetChars(), ScriptName.GetChars(), |
| 1097 | AlreadyGot ? AlreadyGotLine : Line, composed.GetChars()); |
| 1098 | return; |
| 1099 | } |
| 1100 | I_Error ("%sScript error, \"%s\" line %d:\n%s\n", PrependMessage.GetChars(), ScriptName.GetChars(), |
| 1101 | AlreadyGot? AlreadyGotLine : Line, composed.GetChars()); |
| 1102 | } |
| 1103 | |
| 1104 | //========================================================================== |
| 1105 | // |
no test coverage detected