mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
More explicative StackTrace message
This commit is contained in:
parent
c9b97b48bf
commit
b853b4c406
2 changed files with 8 additions and 0 deletions
|
|
@ -264,6 +264,9 @@ void os_abort(void)
|
|||
for (i=0; i<size; ++i)
|
||||
printf("[bt] %02u: %p\n", i, stack[i]);
|
||||
|
||||
printf("Please report this error to the SnapRAID Forum:\n");
|
||||
printf("https://sourceforge.net/p/snapraid/discussion/1677233/\n");
|
||||
|
||||
/* use exit() and not abort to avoid the Windows abort dialog */
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1112,6 +1112,7 @@ void os_abort(void)
|
|||
char** messages;
|
||||
size_t size;
|
||||
unsigned i;
|
||||
#endif
|
||||
|
||||
printf("Stacktrace of " PACKAGE " v" VERSION);
|
||||
#ifdef _linux
|
||||
|
|
@ -1124,6 +1125,7 @@ void os_abort(void)
|
|||
printf(", PATH_MAX=%d", PATH_MAX);
|
||||
printf("\n");
|
||||
|
||||
#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS
|
||||
size = backtrace(stack, 32);
|
||||
|
||||
messages = backtrace_symbols(stack, size);
|
||||
|
|
@ -1150,6 +1152,9 @@ void os_abort(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
printf("Please report this error to the SnapRAID Forum:\n");
|
||||
printf("https://sourceforge.net/p/snapraid/discussion/1677233/\n");
|
||||
|
||||
abort();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue