Commit ace8a9dc authored by Leeor Dicker's avatar Leeor Dicker

Fixes issue #6.

- Added a try/catch block when attempting to instantiate an EditorState. Will display an appropriate error message should an error occur.
parent 91c64efb
......@@ -245,7 +245,14 @@ void StartState::button_LoadExisting_click()
Utility<Renderer>::get().drawText(mFont, "LOADING MAP. PLEASE WAIT...", mLayoutRect.x(), 5, 255, 255, 0);
Utility<Renderer>::get().update();
mReturnState = new EditorState(mapPath);
try
{
mReturnState = new EditorState(mapPath);
}
catch (Exception& e)
{
setMessage("COULDN'T LOAD MAP: " + e.getDescription());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment