X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-scene-loader%2Fpublic-api%2Futils.cpp;h=8b8132ec001f81df132cbcbabb3eb33c0c3d854c;hb=bd126b5d480c08bf7a995b2c4532e80e76ec4ad2;hp=382e118cc96e499092ca1d04e2ba44ef838d7859;hpb=4b8ce75c615d3ebb84de69224a6210d3fd7cdea1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-scene-loader/public-api/utils.cpp b/dali-scene-loader/public-api/utils.cpp index 382e118..8b8132e 100644 --- a/dali-scene-loader/public-api/utils.cpp +++ b/dali-scene-loader/public-api/utils.cpp @@ -35,6 +35,27 @@ namespace thread_local char sExceptionFlingerMessageBuffer[ExceptionFlinger::MESSAGE_BUFFER_SIZE]{}; } +StreamBuffer::StreamBuffer(char* buffer, size_t size) noexcept(true) +{ + setp(buffer, buffer + size); +} + +ExceptionFlinger::Impl::~Impl() noexcept(false) +{ + throw DaliException(mLocation, GetMessageBuffer()); +} + +ExceptionFlinger::ExceptionFlinger(const char* location) noexcept(true) +: mImpl{ location }, + mStreamBuffer(GetMessageBuffer(), MESSAGE_BUFFER_SIZE - 1), + mStream(&mStreamBuffer) +{} + +ExceptionFlinger::~ExceptionFlinger() noexcept(false) +{ + operator<<('\0'); +} + char* ExceptionFlinger::GetMessageBuffer() noexcept(true) { return sExceptionFlingerMessageBuffer;