New variant of gerrinfo() - output to log arbitrary message with file-line information
This commit is contained in:
parent
4ae22df357
commit
bed4391df4
@ -72,6 +72,15 @@ char* gerrinfo(int __type, const char* __file, int __line) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
char* gerrinfo(const char* __message, const char* __file, int __line) {
|
||||||
|
|
||||||
|
snprintf(gerrbuf, sizeof(gerrbuf), "%s at [%s,%u].", __message, CleanFilename(__file), __line);
|
||||||
|
return gerrbuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
char* gerrosinfo() {
|
char* gerrosinfo() {
|
||||||
|
@ -106,8 +106,11 @@ void ErrorExit(int type);
|
|||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
// Return string (static array): Smth. error exit at [__file,__line].
|
||||||
char* gerrinfo(int __type, const char* __file, int __line);
|
char* gerrinfo(int __type, const char* __file, int __line);
|
||||||
|
// Return string (static array): __message at [__file,__line].
|
||||||
|
char* gerrinfo(const char* __message, const char* __file, int __line);
|
||||||
|
// Return string (static array): (OS version) reports error ##: strerror.
|
||||||
char* gerrosinfo();
|
char* gerrosinfo();
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user