You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/11/17 12:14:02 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #938: MINIFICPP-1408 thrown objects should be derived from std::exception

adamdebreceni commented on a change in pull request #938:
URL: https://github.com/apache/nifi-minifi-cpp/pull/938#discussion_r525108234



##########
File path: extensions/sftp/client/SFTPClient.h
##########
@@ -49,6 +50,12 @@ enum class SFTPError : uint8_t {
   SFTP_ERROR_UNEXPECTED
 };
 
+struct SFTPException : Exception {
+  explicit SFTPException(const SFTPError err)
+      :Exception{ExceptionType::FILE_OPERATION_EXCEPTION, fmt::format("SFTP Error {0}", static_cast<int>(err))}

Review comment:
       I am not saying that we should change it in this PR (or in any PR for that matter), but turning `SFTPError` into a `SMART_ENUM` could benefit us, (e.g. here we could then write `err.toString()`)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org