Re: Exception handling (was: Quickies about the new GObject)



Derek Simkowiak <dereks@kd-dev.com> writes: 
> void my_func()
> {
> 	failed = open_file(filename);
> 	if (failed == TRUE) {
> 		GOpenFailedException* exception_obj;
> 
> 		exception_obj = g_open_failed_new(filename);
> 		gtk_signal_emit_by_name(object, "exception", exception_obj);
> 	}
> }

Because open_file() is supposed to throw the exception, not
my_func(). my_func() is supposed to _handle_ the exception. 
That's what it can't do conveniently.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]