From e2efd4a7e43fb34716705a885a20f85fa379d40e Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 5 Mar 2024 16:59:24 -0500 Subject: [PATCH] Added a further check of results from Herget method/'linearizing' steps to break out with an error indicated if either method fails. --- orb_fun2.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/orb_fun2.cpp b/orb_fun2.cpp index 8fb52498..bce507a8 100644 --- a/orb_fun2.cpp +++ b/orb_fun2.cpp @@ -80,9 +80,11 @@ static double simplex_scoring( void *icontext, const double *ivect) if( context->n_params == 2) { - herget_method( context->obs, context->n_obs, ivect[0], ivect[1], - context->orbit, NULL, NULL, NULL); - adjust_herget_results( context->obs, context->n_obs, context->orbit); + if( herget_method( context->obs, context->n_obs, ivect[0], ivect[1], + context->orbit, NULL, NULL, NULL)) + return( 1e+30); + if( adjust_herget_results( context->obs, context->n_obs, context->orbit)) + return( 1e+30); } else {