diff options
author | Marco Bubke <[email protected]> | 2021-12-07 16:18:02 +0100 |
---|---|---|
committer | Marco Bubke <[email protected]> | 2021-12-09 13:13:47 +0000 |
commit | 4e69b0a6893d94c6c5e485147c5dc47b7358624d (patch) | |
tree | 5c7feb61440bab954ea59e39977c4bb8f8adc2b7 /src/libs/sqlite/sqliteexception.cpp | |
parent | 596ac61872905e587b4b0188dae19699f4c2e61d (diff) |
Sqlite: Cleanup exceptions
There are now two base exceptions. Exception and ExceptionWithMessage.
We very often don't use the extra message. So don't pay for what you
don't use. Otherwise it is replacing code with using statements.
Change-Id: I213cf1f02718f6d3b2aa0e2a64626c9fc5c7c917
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Tim Jenssen <[email protected]>
Diffstat (limited to 'src/libs/sqlite/sqliteexception.cpp')
-rw-r--r-- | src/libs/sqlite/sqliteexception.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libs/sqlite/sqliteexception.cpp b/src/libs/sqlite/sqliteexception.cpp index d760ff2b7f9..c95bc7f323f 100644 --- a/src/libs/sqlite/sqliteexception.cpp +++ b/src/libs/sqlite/sqliteexception.cpp @@ -31,12 +31,9 @@ namespace Sqlite { -void Exception::printWarning() const +void ExceptionWithMessage::printWarning() const { - if (!m_sqliteErrorMessage.isEmpty()) - qWarning() << m_whatErrorHasHappen << m_sqliteErrorMessage; - else - qWarning() << m_whatErrorHasHappen; + qWarning() << what() << m_sqliteErrorMessage; } } // namespace Sqlite |