From 5794d41be2d8d6a67dcdfe607e66050f0ac04c55 Mon Sep 17 00:00:00 2001 From: Sameer Agarwal Date: Mon, 25 Nov 2013 13:37:02 -0800 Subject: [PATCH] Remove overzealous checks in Summary::FullReport. Thanks to sebi.koch@gmail.com for reporting this. Change-Id: I1ba9b375e5cf66639e292ba37b34a90446f13162 --- internal/ceres/solver.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/internal/ceres/solver.cc b/internal/ceres/solver.cc index 1420fd8a1..67e168cd2 100644 --- a/internal/ceres/solver.cc +++ b/internal/ceres/solver.cc @@ -86,6 +86,7 @@ Solver::Summary::Summary() // accidentally reporting default values. : minimizer_type(TRUST_REGION), termination_type(DID_NOT_RUN), + error("ceres::Solve was not called."), initial_cost(-1.0), final_cost(-1.0), fixed_cost(-1.0), @@ -133,10 +134,6 @@ Solver::Summary::Summary() string Solver::Summary::BriefReport() const { string report = "Ceres Solver Report: "; if (termination_type == DID_NOT_RUN) { - CHECK(!error.empty()) - << "Solver terminated with DID_NOT_RUN but the solver did not " - << "return a reason. This is a Ceres error. Please report this " - << "to the Ceres team"; return report + "Termination: DID_NOT_RUN, because " + error; } @@ -318,10 +315,6 @@ string Solver::Summary::FullReport() const { } if (termination_type == DID_NOT_RUN) { - CHECK(!error.empty()) - << "Solver terminated with DID_NOT_RUN but the solver did not " - << "return a reason. This is a Ceres error. Please report this " - << "to the Ceres team"; StringAppendF(&report, "Termination: %20s\n", "DID_NOT_RUN"); StringAppendF(&report, "Reason: %s\n", error.c_str());