summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/property_definition.hh
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2020-02-11 17:48:26 +0000
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2020-02-18 17:53:19 -0300
commitdf0715a9aa27903dd549c2b4516ab2cba0274413 (patch)
tree338fa2ea31b02e0a36dc16e8375e978569d6e38e /src/bin/eolian_mono/eolian/mono/property_definition.hh
parenteba07471a0cb9baed2204856078f44cc2d31f7d9 (diff)
C#: Add error checking for Eina.Success_Flag return type
When a get and/or set from property is defined to return, explicitly, a Eina.Success_Flag, the mono generator will check the return value and generate an exception if the call fails. Resolves T8383. Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D11281
Diffstat (limited to '')
-rw-r--r--src/bin/eolian_mono/eolian/mono/property_definition.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/property_definition.hh b/src/bin/eolian_mono/eolian/mono/property_definition.hh
index df94fc36e8..703b70269d 100644
--- a/src/bin/eolian_mono/eolian/mono/property_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/property_definition.hh
@@ -115,11 +115,14 @@ bool property_generate_wrapper_getter(attributes::property_def const& property,
115 if (!property.getter->keys.empty()) 115 if (!property.getter->keys.empty())
116 return false; 116 return false;
117 117
118 if (property.getter->explicit_return_type != attributes::void_) 118 if (property.getter->explicit_return_type != attributes::void_
119 && property.getter->explicit_return_type.c_type != "Eina_Success_Flag")
120 {
119 return false; 121 return false;
122 }
120 123
121 assert (!!property.getter.is_engaged()); 124 assert (!!property.getter.is_engaged());
122 125
123 bool is_interface = context_find_tag<class_context>(context).current_wrapper_kind == class_context::interface; 126 bool is_interface = context_find_tag<class_context>(context).current_wrapper_kind == class_context::interface;
124 if (is_interface) 127 if (is_interface)
125 { 128 {