We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee6c6de commit 06df476Copy full SHA for 06df476
src/oatpp-postgresql/Executor.cpp
@@ -283,7 +283,11 @@ data::share::StringTemplate Executor::parseQueryTemplate(const oatpp::String& na
283
}
284
285
std::shared_ptr<orm::Connection> Executor::getConnection() {
286
- return m_connectionProvider->get();
+ auto connection = m_connectionProvider->get();
287
+ if(connection) {
288
+ return connection;
289
+ }
290
+ throw std::runtime_error("[oatpp::postgresql::Executor::getConnection()]: Error. Can't connect.");
291
292
293
std::shared_ptr<orm::QueryResult> Executor::execute(const StringTemplate& queryTemplate,
0 commit comments