summaryrefslogtreecommitdiff
path: root/codegen/valagdbusservermodule.vala
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2011-08-07 12:44:41 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-10-23 18:45:45 +0200
commit6395a2efe8f166fe8b2595fc2ba08dc4bcc69216 (patch)
tree330e9fd04c476190b76ccc8710ca1d9dd8573fa8 /codegen/valagdbusservermodule.vala
parent6c44fc72635e0a55f57bb9db526c4d83ddd551df (diff)
downloadvala-6395a2efe8f166fe8b2595fc2ba08dc4bcc69216.tar.gz
Collect error_types on demand to allow transformations
Diffstat (limited to 'codegen/valagdbusservermodule.vala')
-rw-r--r--codegen/valagdbusservermodule.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala
index e1984e24f..6b2f31ab4 100644
--- a/codegen/valagdbusservermodule.vala
+++ b/codegen/valagdbusservermodule.vala
@@ -273,7 +273,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
}
if (!m.coroutine || ready) {
- if (m.get_error_types ().size > 0) {
+ if (m.tree_can_fail) {
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("error")));
}
}
@@ -285,7 +285,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
ccode.add_assignment (new CCodeIdentifier ("result"), ccall);
}
- if (m.get_error_types ().size > 0) {
+ if (m.tree_can_fail) {
ccode.open_if (new CCodeIdentifier ("error"));
var return_error = new CCodeFunctionCall (new CCodeIdentifier ("g_dbus_method_invocation_return_gerror"));