projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b39514
)
[MonoError] Add error checking macro
author
Ludovic Henry
<ludovic@xamarin.com>
Tue, 2 Feb 2016 14:15:10 +0000
(14:15 +0000)
committer
Ludovic Henry
<ludovic@xamarin.com>
Tue, 2 Feb 2016 14:27:44 +0000
(14:27 +0000)
mono/utils/mono-error-internals.h
patch
|
blob
|
history
diff --git
a/mono/utils/mono-error-internals.h
b/mono/utils/mono-error-internals.h
index d16f9ef660245c8b944665b45f97c4f012c05f3d..cf90f7ef74fa7ea8c759cf3828487635feef9db6 100644
(file)
--- a/
mono/utils/mono-error-internals.h
+++ b/
mono/utils/mono-error-internals.h
@@
-39,6
+39,9
@@
typedef struct {
#define is_ok(error) ((error)->error_code == MONO_ERROR_NONE)
+#define return_if_nok (error) do { if (!mono_error_ok (error)) return; } while (0)
+#define return_val_if_nok (error,val) do { if (!mono_error_ok (error)) return val; } while (0)
+
void
mono_error_assert_ok_pos (MonoError *error, const char* filename, int lineno);