From 71730c5fa05cabd15c53f68aca84c97620a2128a Mon Sep 17 00:00:00 2001 From: cookielau <30521971+CookieLau@users.noreply.github.com> Date: Thu, 15 Dec 2022 16:45:58 +0800 Subject: [PATCH] Fix incorrect error message in assert functions --- src/include/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/common.h b/src/include/common.h index c4a2d5cf..2e0a82ed 100644 --- a/src/include/common.h +++ b/src/include/common.h @@ -218,7 +218,7 @@ void assert_valid_3d_tri_mesh(const TV& v, const TF& f, std::string v_name="v", ".shape = [" + std::to_string(v.rows()) + ", " + std::to_string(v.cols()) + "]"); } if (f.cols() != 3) { - throw pybind11::value_error("Invalid mesh faces, " + f_name + " must have shape [#faces, 4] but got " + f_name + + throw pybind11::value_error("Invalid mesh faces, " + f_name + " must have shape [#faces, 3] but got " + f_name + ".shape = [" + std::to_string(f.rows()) + ", " + std::to_string(f.cols()) + "]"); } } @@ -265,7 +265,7 @@ void assert_valid_23d_tri_mesh(const TV &v, const TF &f, std::string v_name = "v } if (f.cols() != 3) { - throw pybind11::value_error("Invalid mesh faces, " + f_name + " must have shape [#faces, 4] but got " + f_name + + throw pybind11::value_error("Invalid mesh faces, " + f_name + " must have shape [#faces, 3] but got " + f_name + ".shape = [" + std::to_string(f.rows()) + ", " + std::to_string(f.cols()) + "]"); } }