Skip to content

Commit

Permalink
Add errcode to minio chunkmanager exception(#25153) (#25181)
Browse files Browse the repository at this point in the history
Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
  • Loading branch information
zhagnlu and luzhang committed Jun 28, 2023
1 parent 2273e2a commit 2c722a9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions internal/core/src/storage/MinioChunkManager.cpp
Expand Up @@ -34,12 +34,13 @@
#include "signal.h"
#include "log/Log.h"

#define THROWS3ERROR(FUNCTION) \
do { \
auto& err = outcome.GetError(); \
std::stringstream err_msg; \
err_msg << "Error:" << #FUNCTION << ":" << err.GetExceptionName() << " " << err.GetMessage(); \
throw S3ErrorException(err_msg.str()); \
#define THROWS3ERROR(FUNCTION) \
do { \
auto& err = outcome.GetError(); \
std::stringstream err_msg; \
err_msg << "Error:" << #FUNCTION << "[errcode:" << int(err.GetResponseCode()) \
<< ", exception:" << err.GetExceptionName() << ", errmessage:" << err.GetMessage() << "]"; \
throw S3ErrorException(err_msg.str()); \
} while (0)

#define S3NoSuchBucket "NoSuchBucket"
Expand Down

0 comments on commit 2c722a9

Please sign in to comment.