From f3ed7c7dfbb4efdd8ac9c471ab33ff442b014d8a Mon Sep 17 00:00:00 2001 From: Madeline Busig Date: Sun, 11 May 2025 08:49:54 -0700 Subject: [PATCH] Fix missing catch for ETL exception --- src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index f3e6035..357e27f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -77,9 +77,12 @@ int main(void) { mlog::info << "Added rules" << endl; mlog::info << "Finished configuring ruleset" << endl; - } catch(const mtl::exception&) { + } catch (const mtl::exception&) { mlog::info << "Failed to configure ruleset, caught exception" << endl; return 0; + } catch (const etl::exception& e) { + mlog::error << "Failed to configure ruleset, caught ETL exception" << endl; + return 0; } size_t gen_num = 0; @@ -95,8 +98,10 @@ int main(void) { } } catch (etl::exception& e) { mlog::error << "Caught ETL exception: " << e.what() << endl; + return 0; } catch (mtl::exception& e) { mlog::error << "Caught MTL exception: " << e.id() << endl; + return 0; } mlog::info << "Stepped " << gen.generation_num() << " generations" << mtl::endl;