From 631c41a4e3645a948b0f597caa77e8fa91ca0efc Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 6 Dec 2017 11:53:03 +0000 Subject: COMPMID-556: Rename Error to Status and inverse logic Change-Id: Ib57d4f7177cc6179302bda7ad870acb8bd3825f5 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/112115 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com Reviewed-by: Anthony Barbier --- src/core/Error.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/Error.cpp') diff --git a/src/core/Error.cpp b/src/core/Error.cpp index be362bb7cf..b593c27a7f 100644 --- a/src/core/Error.cpp +++ b/src/core/Error.cpp @@ -30,16 +30,16 @@ using namespace arm_compute; -Error arm_compute::create_error_va_list(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, va_list args) +Status arm_compute::create_error_va_list(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, va_list args) { char out[512]; int offset = snprintf(out, sizeof(out), "in %s %s:%d: ", function, file, line); vsnprintf(out + offset, sizeof(out) - offset, msg, args); - return Error(error_code, std::string(out)); + return Status(error_code, std::string(out)); } -Error arm_compute::create_error(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, ...) +Status arm_compute::create_error(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, ...) { va_list args; va_start(args, msg); @@ -54,9 +54,9 @@ void arm_compute::error(const char *function, const char *file, const int line, va_start(args, msg); auto err = create_error_va_list(ErrorCode::RUNTIME_ERROR, function, file, line, msg, args); va_end(args); - throw std::runtime_error(err.description()); + throw std::runtime_error(err.error_description()); } -void Error::internal_throw_on_error() +void Status::internal_throw_on_error() { - throw std::runtime_error(_description); + throw std::runtime_error(_error_description); } -- cgit v1.2.1