28 #define _CRT_SECURE_NO_DEPRECATE 51 Warn(
WARN_BUG,
"MapErrorMsg::SetWarnLevel(): Illegal error level!",
"");
64 newtime = localtime(&aclock);
69 fprintf(stderr,
"MapErrorMsg::Warn(): Unable to open file" 70 " for error messages: %s\n",
m_warnfile.c_str());
74 fprintf(EFile,
"%s Level %d *****\n%s %s\n",
75 asctime(newtime), a_level, a_msg1.c_str(), a_msg2.c_str());
86 newtime = localtime(&aclock);
91 fprintf(stderr,
"MapErrorMsg::Warn(): Unable to open file" 92 " for error messages: %s\n",
m_warnfile.c_str());
96 fprintf(EFile,
"%s Level %d *****\n%s %d\n",
97 asctime(newtime), a_level, a_msg1.c_str(), a_msg2);
108 newtime=localtime( &aclock );
113 fprintf(stderr,
"MapErrorMsg::Warn(): Unable to open file" 114 " for error messages: %s\n",
m_warnfile.c_str() );
118 fprintf( EFile,
"%s *****\n%s %s\n",
119 asctime(newtime), a_msg1.c_str(), a_msg2.c_str() );
130 newtime=localtime( &aclock );
135 fprintf(stderr,
"MapErrorMsg::Warn(): Unable to open file" 136 " for error messages: %s\n",
m_warnfile.c_str() );
140 fprintf( EFile,
"%s *****\n%s %g\n",
141 asctime(newtime), a_msg1.c_str(), a_num );
157 fprintf(stderr,
"MapErrorMsg::Warn(): Unable to open file" 158 " for error messages: %s\n",
m_warnfile.c_str() );
162 fprintf( EFile,
"%s%s", a_add1.c_str(), a_add2.c_str() );
168 int random(
int a_range )
174 return (
int)(rand()%a_range);
void WarnAddInfo(MapErrorState a_level, std::string a_add1, std::string a_add2)
class MapErrorMsg * g_msg
void SetWarnLevel(MapErrorState a_level)
MapErrorMsg(std::string a_warnfile)
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)