Possibly fix ByteBuffer when no ACE_Stack_Trace available.

Testing required as I do not have access to a system that lacks ACE_Stack_Trace."
This commit is contained in:
LordJZ 2012-08-03 05:14:11 +04:00
parent 4bf5c3d701
commit 9daa9ad472

View file

@ -34,11 +34,20 @@ class ByteBufferException
void PrintPosError() const void PrintPosError() const
{ {
char const* traceStr;
#ifdef HAVE_ACE_STACK_TRACE_H
ACE_Stack_Trace trace; ACE_Stack_Trace trace;
traceStr = trace.c_str();
#else
traceStr = NULL;
#endif
sLog.outError( sLog.outError(
"Attempted to %s in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD") " "Attempted to %s in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD") "
"value with size: " SIZEFMTD "\n%s", "value with size: " SIZEFMTD "%s%s",
(add ? "put" : "get"), pos, size, esize, trace.c_str()); (add ? "put" : "get"), pos, size, esize,
traceStr ? "\n" : "", traceStr ? traceStr : "");
} }
private: private:
bool add; bool add;