From d2d7f939a66534c3df6bded430de1a68fe634339 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 16 Jun 2025 14:10:36 +0200 Subject: [PATCH] Sqlite: Print error message in ConstraintPreventsModification::what() Change-Id: Iffec725e59800bcb0b47bdf3268837c4f69c7eaa Reviewed-by: Thomas Hartmann --- src/libs/sqlite/sqliteexception.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/sqlite/sqliteexception.cpp b/src/libs/sqlite/sqliteexception.cpp index 5ea31e036ae..ac9e5e3f882 100644 --- a/src/libs/sqlite/sqliteexception.cpp +++ b/src/libs/sqlite/sqliteexception.cpp @@ -85,7 +85,11 @@ const char *InputOutputError::what() const noexcept const char *ConstraintPreventsModification::what() const noexcept { - return "Sqlite::ConstraintPreventsModification"; + static std::string text; + text = "Sqlite::ConstraintPreventsModification: "; + text += message(); + + return text.c_str(); } const char *NoValuesToFetch::what() const noexcept