OpenClonk
C4MCParserErr Class Reference

#include <C4MapCreatorS2.h>

Public Member Functions

 C4MCParserErr (C4MCParser *pParser, const char *szMsg)
 
 C4MCParserErr (C4MCParser *pParser, const char *szMsg, const char *szPar)
 
void show ()
 

Public Attributes

char Msg [C4MaxMessage]
 

Detailed Description

Definition at line 344 of file C4MapCreatorS2.h.

Constructor & Destructor Documentation

◆ C4MCParserErr() [1/2]

C4MCParserErr::C4MCParserErr ( C4MCParser pParser,
const char *  szMsg 
)

Definition at line 907 of file C4MapCreatorS2.cpp.

908 {
909  // create error message
910  sprintf(Msg, "%s: %s (%d)", pParser->Filename, szMsg, pParser->BPos ? SGetLine(pParser->BPos, pParser->CPos) : 0);
911 }
int SGetLine(const char *szText, const char *cpPosition)
Definition: Standard.cpp:479
#define sprintf
Definition: Standard.h:162
char Msg[C4MaxMessage]

References Msg, SGetLine(), and sprintf.

Here is the call graph for this function:

◆ C4MCParserErr() [2/2]

C4MCParserErr::C4MCParserErr ( C4MCParser pParser,
const char *  szMsg,
const char *  szPar 
)

Definition at line 913 of file C4MapCreatorS2.cpp.

914 {
915  char Buf[C4MaxMessage];
916  // create error message
917  sprintf(Buf, szMsg, szPar);
918  sprintf(Msg, "%s: %s (%d)", pParser->Filename, Buf, pParser->BPos ? SGetLine(pParser->BPos, pParser->CPos) : 0);
919 }
const int C4MaxMessage
Definition: C4Constants.h:28

References C4MaxMessage, Msg, SGetLine(), and sprintf.

Here is the call graph for this function:

Member Function Documentation

◆ show()

void C4MCParserErr::show ( )

Definition at line 921 of file C4MapCreatorS2.cpp.

922 {
923  // log error
924  Log(Msg);
925 }
bool Log(const char *szMessage)
Definition: C4Log.cpp:204

References Log(), and Msg.

Referenced by C4MapCreatorS2::ReadFile(), and C4MapCreatorS2::ReadScript().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ Msg

char C4MCParserErr::Msg[C4MaxMessage]

Definition at line 347 of file C4MapCreatorS2.h.

Referenced by c4_mapgen_handle_new(), C4MCParserErr(), and show().


The documentation for this class was generated from the following files: