handle errors in main entry point

This commit is contained in:
scawful
2024-05-30 00:31:02 -04:00
parent fb22dc2bb1
commit 0f19fda556
3 changed files with 8 additions and 4 deletions

View File

@@ -41,7 +41,10 @@ int main(int argc, char** argv) {
try {
while (controller.IsActive()) {
controller.OnInput();
controller.OnLoad();
if (auto status = controller.OnLoad(); !status.ok()) {
std::cerr << status.message() << std::endl;
break;
}
controller.DoRender();
}
controller.OnExit();