aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Error.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2018-11-30 16:30:43 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2018-12-03 13:47:53 +0000
commit323ce0f0b06bca785959913e75e1f51d383c351a (patch)
treedc3729e19a43d8290285987c51d9799581412c33 /arm_compute/core/Error.h
parent08a4517905da959b6e3401cc24f5e2018f9b51ac (diff)
downloadComputeLibrary-323ce0f0b06bca785959913e75e1f51d383c351a.tar.gz
COMPMID-1819 Add option to build library with -fno-exceptions
Change-Id: I3de6bb33746d52f8d8c337ab7776eccee8c205fb Reviewed-on: https://review.mlplatform.org/328 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/Error.h')
-rw-r--r--arm_compute/core/Error.h6
1 files changed, 6 insertions, 0 deletions
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__ */