From 517f75ee3a74ed8eb7ade180cfe3a177684bdc01 Mon Sep 17 00:00:00 2001 From: lganzzzo Date: Sat, 25 Jan 2020 11:08:37 +0700 Subject: [PATCH] Add logging to ApiClient/ApiController object mapping methods. --- src/oatpp/web/client/ApiClient.hpp | 2 ++ src/oatpp/web/server/api/ApiController.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/oatpp/web/client/ApiClient.hpp b/src/oatpp/web/client/ApiClient.hpp index 1b4f49c4..e3442f70 100644 --- a/src/oatpp/web/client/ApiClient.hpp +++ b/src/oatpp/web/client/ApiClient.hpp @@ -210,6 +210,8 @@ public: template oatpp::String convertParameterToString(const oatpp::String& typeName, const T& parameter) { + OATPP_LOGE("[oatpp::web::client::ApiClient::convertParameterToString()]", + "Error. No conversion from '%s' to '%s' is defined.", typeName->getData(), "oatpp::String"); throw std::runtime_error("[oatpp::web::client::ApiClient::convertParameterToString()]: Error. " "No conversion from '" + typeName->std_str() + "' to 'oatpp::String' is defined. " "Please define type conversion."); diff --git a/src/oatpp/web/server/api/ApiController.hpp b/src/oatpp/web/server/api/ApiController.hpp index f34dc6bf..d02f12d5 100644 --- a/src/oatpp/web/server/api/ApiController.hpp +++ b/src/oatpp/web/server/api/ApiController.hpp @@ -452,6 +452,8 @@ public: T parseParameterFromString(const oatpp::String& typeName, const oatpp::String& text, bool& success) { (void) text; success = false; + OATPP_LOGE("[oatpp::web::server::api::ApiController::parseParameterFromString()]", + "Error. No conversion from '%s' to '%s' is defined.", "oatpp::String", typeName->getData()); throw std::runtime_error("[oatpp::web::server::api::ApiController::parseParameterFromString()]: Error. " "No conversion from 'oatpp::String' to '" + typeName->std_str() + "' is defined. " "Please define type conversion.");