diff --git a/barretenberg/cpp/src/barretenberg/stdlib/primitives/pairing_points.hpp b/barretenberg/cpp/src/barretenberg/stdlib/primitives/pairing_points.hpp index c87964f35620..be213c42845c 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/primitives/pairing_points.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/primitives/pairing_points.hpp @@ -54,8 +54,12 @@ template struct PairingPoints { } #ifndef NDEBUG - bb::PairingPoints native_pp(P0().get_value(), P1().get_value()); - info("Are Pairing Points with tag ", tag_index, " valid? ", native_pp.check() ? "true" : "false"); + try { + bb::PairingPoints native_pp(P0().get_value(), P1().get_value()); + info("Are Pairing Points with tag ", tag_index, " valid? ", native_pp.check() ? "true" : "false"); + } catch (const std::exception&) { + info("Are Pairing Points with tag ", tag_index, " valid? false (point not on curve)"); + } #endif } @@ -210,8 +214,13 @@ template struct PairingPoints { } #ifndef NDEBUG - bb::PairingPoints native_pp(P0().get_value(), P1().get_value()); - info("Are aggregated Pairing Points with tag ", tag_index, " valid? ", native_pp.check() ? "true" : "false"); + try { + bb::PairingPoints native_pp(P0().get_value(), P1().get_value()); + info( + "Are aggregated Pairing Points with tag ", tag_index, " valid? ", native_pp.check() ? "true" : "false"); + } catch (const std::exception&) { + info("Are aggregated Pairing Points with tag ", tag_index, " valid? false (point not on curve)"); + } #endif }