From 323ce0f0b06bca785959913e75e1f51d383c351a Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Fri, 30 Nov 2018 16:30:43 +0000 Subject: COMPMID-1819 Add option to build library with -fno-exceptions Change-Id: I3de6bb33746d52f8d8c337ab7776eccee8c205fb Reviewed-on: https://review.mlplatform.org/328 Reviewed-by: Georgios Pinitas Reviewed-by: Pablo Marquez Tested-by: Arm Jenkins --- arm_compute/core/Error.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arm_compute/core/Error.h') diff --git a/arm_compute/core/Error.h b/arm_compute/core/Error.h index f137be6ecb..64bfbd2787 100644 --- a/arm_compute/core/Error.h +++ b/arm_compute/core/Error.h @@ -347,4 +347,10 @@ Status create_error(ErrorCode error_code, const char *function, const char *file #define ARM_COMPUTE_ERROR_ON_LOC(cond, func, file, line) \ ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, #cond) +#ifndef ARM_COMPUTE_EXCEPTIONS_DISABLED +#define ARM_COMPUTE_THROW(ex) throw(ex) +#else /* ARM_COMPUTE_EXCEPTIONS_DISABLED */ +#define ARM_COMPUTE_THROW(ex) (ex), std::abort() +#endif /* ARM_COMPUTE_EXCEPTIONS_DISABLED */ + #endif /* __ARM_COMPUTE_ERROR_H__ */ -- cgit v1.2.1