Add errcode to minio chunkmanager exception(#25153) (#25154)

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
pull/26448/head
zhagnlu 2023-08-17 20:22:27 +08:00 committed by GitHub
parent 63b86b32a6
commit 08547fe1a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -35,13 +35,15 @@
#include "log/Log.h"
#include "signal.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"