Re: [gtkmm] Glib::Module API issues
- From: Paul Davis <paul linuxaudiosystems com>
- To: Murray Cumming Comneon com
- Cc: r burton 180sw com, gtkmm-list gnome org
- Subject: Re: [gtkmm] Glib::Module API issues
- Date: Fri, 21 Mar 2003 10:39:44 -0500
>I suppose we should throw an exception, but constructors can't do that (I
>think) so we could add an operator=() instead. That would be like using a
at least with gcc 2.95 and 3, constructors can throw exceptions, no problem.
of course, many C++ pundits believe that its exactly this design issue
that leads one to conclude that you should always use a 2-stage
construction process: call the constructor (never fails, does nothing
that could fail), then call an "init" function, which might throw an
exception.
myself, i just throw exceptions from the constructor, in particular a
specific exception called failed_constructor.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]