*/
/**
- * @deprecated use EINA_LOG_ERR() instead.
- * @def EINA_ERROR_PERR(fmt, ...)
- * Print the error message described with the formatted string @a fmt
- * using the current print callback, file function and line, with the
- * error level EINA_ERROR_LEVEL_ERR.
- */
-#define EINA_ERROR_PERR(fmt, ...) \
- eina_error_print(EINA_LOG_LEVEL_ERR, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)
-
-/**
- * @deprecated use EINA_LOG_INFO() instead.
- * @def EINA_ERROR_PINFO(fmt, ...)
- * Print the error message described with the formatted string @a fmt
- * using the current print callback, file function and line, with the
- * error level EINA_ERROR_LEVEL_INFO.
- */
-#define EINA_ERROR_PINFO(fmt, ...) \
- eina_error_print(EINA_LOG_LEVEL_INFO, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)
-
-/**
- * @deprecated use EINA_LOG_WARN() instead.
- * @def EINA_ERROR_PWARN(fmt, ...)
- * Print the error message described with the formatted string @a fmt
- * using the current print callback, file function and line, with the
- * error level EINA_ERROR_LEVEL_WARN.
- */
-#define EINA_ERROR_PWARN(fmt, ...) \
- eina_error_print(EINA_LOG_LEVEL_WARN, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)
-
-/**
- * @deprecated use EINA_LOG_DBG() instead.
- * @def EINA_ERROR_PDBG(fmt, ...)
- * Print the error message described with the formatted string @a fmt
- * using the current print callback, file function and line, with the
- * error level EINA_ERROR_LEVEL_DBG.
- */
-#define EINA_ERROR_PDBG(fmt, ...) \
- eina_error_print(EINA_LOG_LEVEL_DBG, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)
-
-
-/**
* @typedef Eina_Error
* Error type.
*/
EAPI Eina_Error eina_error_get(void);
EAPI void eina_error_set(Eina_Error err);
EAPI const char * eina_error_msg_get(Eina_Error error) EINA_PURE;
-EINA_DEPRECATED EAPI void eina_error_print(int level, const char *file,
- const char *function, int line, const char *fmt, ...) EINA_ARG_NONNULL(2, 3, 5) EINA_PRINTF(5, 6);
-EINA_DEPRECATED EAPI void eina_error_vprint(int level, const char *file,
- const char *fnc, int line, const char *fmt, va_list args) EINA_ARG_NONNULL(2, 3, 5);
-EINA_DEPRECATED EAPI void eina_error_log_level_set(int level);
/**
* @}
#include "eina_config.h"
#include "eina_private.h"
-#include "eina_log.h" /* remove me when eina_error_print is removed! */
/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
#include "eina_error.h"
/* TODO
- * + printing errors to stdout or stderr can be implemented
- * using a queue, useful for multiple threads printing
* + add a wrapper for assert?
* + add common error numbers, messages
* + add a calltrace of errors, not only store the last error but a list of them
}
/**
- * @deprecated use eina_log_print() instead.
- */
-EAPI void eina_error_print(int level, const char *file,
- const char *fnc, int line, const char *fmt, ...)
-{
- va_list args;
-
- EINA_SAFETY_ON_NULL_RETURN(file);
- EINA_SAFETY_ON_NULL_RETURN(fnc);
- EINA_SAFETY_ON_NULL_RETURN(fmt);
-
- EINA_LOG_WARN("this function is deprecated!");
-
- va_start(args, fmt);
- eina_log_vprint(EINA_LOG_DOMAIN_GLOBAL, level, file, fnc, line, fmt, args);
- va_end(args);
-}
-
-/**
- * @deprecated use eina_log_vprint() instead.
- */
-EAPI void eina_error_vprint(int level, const char *file,
- const char *fnc, int line, const char *fmt, va_list args)
-{
- EINA_SAFETY_ON_NULL_RETURN(file);
- EINA_SAFETY_ON_NULL_RETURN(fnc);
- EINA_SAFETY_ON_NULL_RETURN(fmt);
-
- EINA_LOG_WARN("this function is deprecated!");
-
- eina_log_vprint(EINA_LOG_DOMAIN_GLOBAL, level, file, fnc, line, fmt, args);
-}
-
-/**
- * @deprecated use eina_log_level_set() instead.
- */
-EAPI void eina_error_log_level_set(int level)
-{
- EINA_LOG_WARN("this function is deprecated!");
- eina_log_level_set(level);
-}
-
-/**
* @}
*/