diff --git a/test/mock-object.vala b/test/mock-object.vala index 59b4b56e..eaffa5e9 100644 --- a/test/mock-object.vala +++ b/test/mock-object.vala @@ -165,11 +165,11 @@ public interface MockObject { return return_object; } - protected R object_or_throw_call(string name, Object[] args, Error default_error) - throws Error { + protected R object_or_throw_call(string name, Object[] args, GLib.Error default_error) + throws GLib.Error { ExpectedCall? expected = call_made(name, args); - if (expected.return_object != null) { + if (expected.return_object == null) { throw default_error; } return expected.return_object;