Skip to content

Commit

Permalink
улучшен вывод ошибок
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorTrapenok committed Mar 14, 2015
1 parent f396cee commit c2bf69f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion for-redis-2.8/SimpleRedisClient.cpp
Expand Up @@ -33,13 +33,25 @@
#include <stdlib.h>
#include <string.h>

#include "backtrace.h"
#include <execinfo.h>

#include "SimpleRedisClient.h"

#define debugLine printf("\n%s:%d\n", __FILE__, __LINE__)


static void full_write(int fd, const char *buf, size_t len)
{
while (len > 0) {
ssize_t ret = write(fd, buf, len);

if ((ret == -1) && (errno != EINTR))
break;

buf += (size_t) ret;
len -= (size_t) ret;
}
}

void print_rcBacktrace(const char* reason)
{
Expand Down

0 comments on commit c2bf69f

Please sign in to comment.