diff --git a/SDLWrapper/Font.cpp b/SDLWrapper/Font.cpp index 75afcd6..55682ac 100644 --- a/SDLWrapper/Font.cpp +++ b/SDLWrapper/Font.cpp @@ -215,7 +215,9 @@ Rect Font::sizeText(const std::string& Text) const throw (ErrorViewer) if(TTF_SizeText(_get(),Text.c_str(),&w,&h)!=0) { /// Something might be wrong - throw ErrorViewer(); + ErrorViewer e; + e.fetch(); + throw e; } return Rect(0,0,w,h); } @@ -226,7 +228,9 @@ Rect Font::sizeUTF8(const std::string& Text) const throw (ErrorViewer) if(TTF_SizeUTF8(_get(),Text.c_str(),&w,&h)!=0) { /// Something might be wrong - throw ErrorViewer(); + ErrorViewer e; + e.fetch(); + throw e; } return Rect(0,0,w,h); } @@ -237,7 +241,9 @@ Rect Font::sizeUnicode(const uint16_t* Text) const throw (ErrorViewer) if(TTF_SizeUNICODE(_get(),Text,&w,&h)!=0) { /// Something might be wrong - throw ErrorViewer(); + ErrorViewer e; + e.fetch(); + throw e; } return Rect(0,0,w,h); } diff --git a/SDLWrapper/Renderer.cpp b/SDLWrapper/Renderer.cpp index 85322ff..00664e0 100644 --- a/SDLWrapper/Renderer.cpp +++ b/SDLWrapper/Renderer.cpp @@ -58,7 +58,9 @@ Renderer::Renderer(Window& wnd,std::initializer_list RendererFlags { if(createRenderer(wnd,RendererFlags)!=0) { - throw ErrorViewer(); + ErrorViewer e; + e.fetch(); + throw e; } } @@ -66,7 +68,9 @@ Renderer::Renderer(Surface& surf) throw (ErrorViewer) { if(createSoftRenderer(surf)!=0) { - throw ErrorViewer(); + ErrorViewer e; + e.fetch(); + throw e; } }