Re: Exception handling (was: Quickies about the new GObject)
- From: Havoc Pennington <hp redhat com>
- To: Derek Simkowiak <dereks kd-dev com>
- Cc: gtk-devel-list redhat com
- Subject: Re: Exception handling (was: Quickies about the new GObject)
- Date: 01 Jun 2000 16:41:54 -0400
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]