| 328 | |
| 329 | |
| 330 | bool ErrorHandler::GetSysErrMsg(wchar *Msg,size_t Size) |
| 331 | { |
| 332 | #ifndef SILENT |
| 333 | #ifdef _WIN_ALL |
| 334 | int ErrType=GetLastError(); |
| 335 | if (ErrType!=0) |
| 336 | return FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, |
| 337 | NULL,ErrType,MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), |
| 338 | Msg,(DWORD)Size,NULL)!=0; |
| 339 | #endif |
| 340 | |
| 341 | #if defined(_UNIX) || defined(_EMX) |
| 342 | if (errno!=0) |
| 343 | { |
| 344 | char *err=strerror(errno); |
| 345 | if (err!=NULL) |
| 346 | { |
| 347 | CharToWide(err,Msg,Size); |
| 348 | return true; |
| 349 | } |
| 350 | } |
| 351 | #endif |
| 352 | #endif |
| 353 | return false; |
| 354 | } |
| 355 | |
| 356 | |
| 357 | void ErrorHandler::SysErrMsg() |
nothing calls this directly
no test coverage detected