display the correct function name when displaying an error
SVN revision: 37212
This commit is contained in:
parent
ed57d68446
commit
3aa052f73c
|
@ -2,7 +2,7 @@
|
|||
#define __EVIL_PRIVATE_H__
|
||||
|
||||
|
||||
void _evil_error_display(LONG res);
|
||||
void _evil_error_display(const char *fct, LONG res);
|
||||
|
||||
|
||||
#endif /* __EVIL_PRIVATE_H__ */
|
||||
|
|
|
@ -49,7 +49,7 @@ getenv(const char *name)
|
|||
0, 0,
|
||||
&key)) != ERROR_SUCCESS)
|
||||
{
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FILE__, res);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ getenv(const char *name)
|
|||
if (!wname)
|
||||
{
|
||||
if ((res = RegCloseKey (key)) != ERROR_SUCCESS)
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FUNCTION__, res);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ getenv(const char *name)
|
|||
&size)) != ERROR_SUCCESS)
|
||||
{
|
||||
if ((res = RegCloseKey (key)) != ERROR_SUCCESS)
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FUNCTION__, res);
|
||||
free(wname);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ getenv(const char *name)
|
|||
|
||||
if ((res = RegCloseKey (key)) != ERROR_SUCCESS)
|
||||
{
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FUNCTION__, res);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ setenv(const char *name,
|
|||
&key,
|
||||
&disposition)) != ERROR_SUCCESS)
|
||||
{
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FUNCTION__, res);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ setenv(const char *name,
|
|||
if (!wname)
|
||||
{
|
||||
if ((res = RegCloseKey (key)) != ERROR_SUCCESS)
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FUNCTION__, res);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -216,9 +216,9 @@ setenv(const char *name,
|
|||
strlen(value) + 1)) != ERROR_SUCCESS)
|
||||
{
|
||||
free(wname);
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FUNCTION__, res);
|
||||
if ((res = RegCloseKey (key)) != ERROR_SUCCESS)
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FUNCTION__, res);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,7 @@ setenv(const char *name,
|
|||
|
||||
if ((res = RegCloseKey (key)) != ERROR_SUCCESS)
|
||||
{
|
||||
_evil_error_display(res);
|
||||
_evil_error_display(__FUNCTION__, res);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ evil_getcwd(char *buffer, size_t size)
|
|||
|
||||
if (!ret)
|
||||
{
|
||||
_evil_error_display(ret);
|
||||
_evil_error_display(__FUNCTION__, ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,12 +93,12 @@ evil_format_message(long err)
|
|||
}
|
||||
|
||||
void
|
||||
_evil_error_display(LONG res)
|
||||
_evil_error_display(const char *fct, LONG res)
|
||||
{
|
||||
char *error;
|
||||
|
||||
error = evil_format_message(res);
|
||||
fprintf(stderr, "[Evil] [%s] ERROR: %s\n", __FUNCTION__, error);
|
||||
fprintf(stderr, "[Evil] [%s] ERROR: %s\n", fct, error);
|
||||
free(error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue