From f9304a95244eb1d6b9d84b7a78db9b45772f31e5 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Fri, 10 Nov 2023 14:04:48 +0100 Subject: [PATCH] add control_state to validation error message --- core/src/validation.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/validation.jl b/core/src/validation.jl index 892c5169b..a5b05bcd0 100644 --- a/core/src/validation.jl +++ b/core/src/validation.jl @@ -589,7 +589,10 @@ function valid_fractional_flow( if fraction <= 0 errors = true @error( - "Fractional flow nodes must have non-negative fractions, got $fraction for #$ff_id." + "Fractional flow nodes must have non-negative fractions.", + fraction, + node_id = ff_id, + control_state, ) end end @@ -597,7 +600,10 @@ function valid_fractional_flow( if fraction_sum ≉ 1 errors = true @error( - "The sum of fractional flow fractions leaving a node must be ≈1, got $fraction_sum for #$src_id." + "The sum of fractional flow fractions leaving a node must be ≈1.", + fraction_sum, + node_id = src_id, + control_state, ) end end