Skip to content

Commit

Permalink
Possibly fix ByteBuffer when no ACE_Stack_Trace available.
Browse files Browse the repository at this point in the history
Testing required as I do not have access to a system that lacks ACE_Stack_Trace."
  • Loading branch information
LordJZ authored and Salja committed Aug 4, 2012
1 parent 45db931 commit 035f4f9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/shared/ByteBuffer.h
Expand Up @@ -54,11 +54,20 @@ class ByteBufferException

void PrintPosError() const
{
char const* traceStr;

#ifdef HAVE_ACE_STACK_TRACE_H
ACE_Stack_Trace trace;
traceStr = trace.c_str();
#else
traceStr = NULL;
#endif

sLog.outError(
"Attempted to %s in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD") "
"value with size: " SIZEFMTD "\n%s",
(add ? "put" : "get"), pos, size, esize, trace.c_str());
"value with size: " SIZEFMTD "%s%s",
(add ? "put" : "get"), pos, size, esize,
traceStr ? "\n" : "", traceStr ? traceStr : "");
}
private:
bool add;
Expand Down

0 comments on commit 035f4f9

Please sign in to comment.