From fecda12a49e445f7de3c6e6452c65b96cd6861e5 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 12 Feb 2006 15:42:28 +0000 Subject: [PATCH] Raise errors in EventHandler#initialize rather than returning nil. --- src/ecore/rb_event_handler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ecore/rb_event_handler.c b/src/ecore/rb_event_handler.c index 81a5fdc..12e2739 100644 --- a/src/ecore/rb_event_handler.c +++ b/src/ecore/rb_event_handler.c @@ -1,5 +1,5 @@ /* - * $Id: rb_event_handler.c 357 2006-02-12 15:40:30Z tilman $ + * $Id: rb_event_handler.c 358 2006-02-12 15:42:28Z tilman $ * * Copyright (C) 2004 ruby-ecore team (see AUTHORS) * @@ -83,14 +83,14 @@ static VALUE c_init (VALUE self, VALUE type) int t; if (!rb_block_given_p ()) - return Qnil; + rb_raise (rb_eStandardError, "block missing"); Data_Get_Struct (self, RbEventHandler, h); t = NUM2INT (type); if (t <= ECORE_EVENT_NONE) - return Qnil; + rb_raise (rb_eStandardError, "invalid type"); rb_iv_set (self, "@type", type); -- 2.30.2