Go to the documentation of this file.
42 int strsize = 0, strcursor = 0;
44 size = backtrace (array, 20);
45 strings = backtrace_symbols (array, size);
46 if (strings != NULL) {
47 for (i = 0; i < size; i++)
48 strsize += strlen (strings[i]);
50 retstr = malloc (
sizeof (
char) * (strsize + 1));
52 for (i = 0; i < size; i++) {
53 len = strlen (strings[i]);
54 memcpy (retstr + strcursor, strings[i], len);
58 retstr[strsize] =
'\0';
64 retstr = strdup (
"Android-nnstreamer does not support backtrace.\n");
70 #define _NNSTREAMER_ERROR_LENGTH (4096U)
107 va_start (arg_ptr, fmt);
static char errmsg[_NNSTREAMER_ERROR_LENGTH]
Internal log util for NNStreamer plugins and native APIs.
__attribute__((__format__(__printf__, 1, 2)))
overwrites the error message buffer with the new message.
const char * _nnstreamer_error(void)
return the last internal error string and clean it.
void _nnstreamer_error_clean(void)
cleans up the error message buffer.
char * _backtrace_to_string(void)
stack trace as a string for error messages
static int errmsg_reported
#define _NNSTREAMER_ERROR_LENGTH
void _nnstreamer_error_write(const char *fmt,...)
overwrites the error message buffer with the new message.
G_LOCK_DEFINE_STATIC(errlock)