From 75e776d7f935212a8b8259c2f370c63eb59b2be2 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 8 Jun 2026 08:48:46 +0200 Subject: [PATCH] fix(core): Return an error code when points below the seabed are detected --- source/MoorDyn2.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/MoorDyn2.cpp b/source/MoorDyn2.cpp index 383717da..dc486d0a 100644 --- a/source/MoorDyn2.cpp +++ b/source/MoorDyn2.cpp @@ -522,7 +522,12 @@ moordyn::MoorDyn::Init(const double* x, const double* xd, bool skip_ic) } // call this just to set WaterKin (may also set up output file in // future) - PointList[l]->initialize(); + try { + PointList[l]->initialize(); + } + MOORDYN_CATCHER(err, err_msg); + if (err != MOORDYN_SUCCESS) + return err; ix += 3; }