[Gtk-sharp-list] Gdk.Color, further comments.
Miguel de Icaza
miguel@ximian.com
04 Mar 2003 16:33:02 -0500
hello,
> public override void Close()
> {
> GnomeVFSResult result = gnome_vfs_close(this.Handle);
>
> if (GnomeVFSResultOK != result) {
> throw new Gnome.VFS.Exception(result);
> }
> }
>
> As you can see, there is no way to "return" the error. So, currently,
> I just throw it. I could take an alternate approach. (I could have
> something like a "errno" in the class, and do stuff like this.)
You can change that to be:
public GnomeVFSResult Close ()
{
return gnome_vfs_close (this.Handle);
}
If someone wants exceptions, wrap it up on a different namespace (as
suggeste earlier today):
public Close ()
{
if (GnomeVFS.Close () != GnomeVFSResultOK)
throw new Exception ();
}
Miguel