mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Fix bugs of ErrorViewer
This commit is contained in:
parent
1ac2ea6c31
commit
c769c0a3db
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,9 @@ Renderer::Renderer(Window& wnd,std::initializer_list<RendererType> 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user