added libtorrent version and svn revision to assert output

This commit is contained in:
Arvid Norberg 2009-01-14 08:41:14 +00:00
parent 66ccc9d23f
commit bd1757fbd2
2 changed files with 5 additions and 1 deletions

View File

@ -37,5 +37,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define LIBTORRENT_VERSION_MINOR 15
#define LIBTORRENT_VERSION "0.15.0.0"
#define LIBTORRENT_REVISION "$Rev$"
#endif

View File

@ -86,6 +86,7 @@ std::string demangle(char const* name)
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include "libtorrent/version.hpp"
// execinfo.h is available in the MacOS X 10.5 SDK.
#if (defined __linux__ || (defined __APPLE__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050))
@ -117,10 +118,12 @@ void assert_fail(char const* expr, int line, char const* file, char const* funct
fprintf(stderr, "assertion failed. Please file a bugreport at "
"http://code.rasterbar.com/libtorrent/newticket\n"
"Please include the following information:\n\n"
"version: " LIBTORRENT_VERSION "\n"
"%s"
"file: '%s'\n"
"line: %d\n"
"function: %s\n"
"expression: %s\n", file, line, function, expr);
"expression: %s\n", LIBTORRENT_REVISION, file, line, function, expr);
print_backtrace("stack:");