GtkSharp/glib/GException.cs
Mike Kestner dbfe6207a7 2002-06-20 Mike Kestner <mkestner@speakeasy.net>
* generator/Parameters.cs : GError handling overhaul
	* generator/SymbolTable.cs : map GError to IntPtr
	* glib/GException.cs : Refactor to use glue.
	* glue/Makefile.am : add the error.c file.
	* glue/error.c : glue for error message string access
	* gtk/makefile.win32 : ref the gdk-imaging-sharp assembly

svn path=/trunk/gtk-sharp/; revision=5351
2002-06-20 01:45:13 +00:00

37 lines
670 B
C#

// GException.cs : GError handling
//
// Authors: Rachel Hestilow <hestilow@ximian.com>
//
// (c) 2002 Rachel Hestilow
namespace GLib {
using System;
using System.Runtime.InteropServices;
public class GException : Exception
{
IntPtr errptr;
public GException (IntPtr errptr) : base ()
{
this.errptr = errptr;
}
[DllImport("gtksharpglue")]
static extern string gtksharp_error_get_message (IntPtr errptr);
public override string Message {
get {
return gtksharp_error_get_message (errptr);
}
}
[DllImport("glib-2.0")]
static extern void g_clear_error (IntPtr errptr);
~GException ()
{
g_clear_error (errptr);
}
}
}