summaryrefslogtreecommitdiff
path: root/source/utilities/Error.h
diff options
context:
space:
mode:
authorViktor Mladenovski <viktor.mladenovski@stericsson.com>2011-05-20 14:10:59 +0200
committerViktor Mladenovski <viktor.mladenovski@stericsson.com>2011-05-20 14:10:59 +0200
commitf7e95217e936da34d7124aaced590692eb515923 (patch)
tree2d9ef4750a67d9d1dd3fe9180a4fef2929fad54b /source/utilities/Error.h
Initial contribution of loader_communication
ST-Ericsson ID: 326913 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204 Change-Id: I171cfc2ee458a8a0a91a1916137d131f0f7ecee5
Diffstat (limited to 'source/utilities/Error.h')
-rwxr-xr-xsource/utilities/Error.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/utilities/Error.h b/source/utilities/Error.h
new file mode 100755
index 0000000..0693287
--- /dev/null
+++ b/source/utilities/Error.h
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (C) ST-Ericsson SA 2011
+ * License terms: 3-clause BSD license
+ ******************************************************************************/
+#ifndef _ERROR_H_
+#define _ERROR_H_
+
+#define VERIFY(Condition, ErrorCode)\
+ do\
+ {\
+ if(!(Condition))\
+ {\
+ ReturnValue = (ErrorCode);\
+ goto ErrorExit;\
+ }\
+ } while(0)
+
+#define VERIFY_SUCCESS(ErrorCode)\
+ do\
+ {\
+ ReturnValue = (ErrorCode);\
+ VERIFY(E_SUCCESS == ReturnValue, ReturnValue);\
+ } while (0)
+
+#endif // _ERROR_H_