Ryujinx-GtkSharp/glib/GException.cs
Mike Kestner e83c55a242 2004-03-12 Mike Kestner <mkestner@ximian.com>
* */Makefile.am : automakify the build
	* */Makefile.in : kill
	* *.custom : remove System.Drawing dependencies
	* *.cs : remove System.Drawing dependencies
	* *-api.xml : mv to *-api.raw
	* glue/* : mv to lib specific gluelibs for glib, gdk, gtk, and glade.
	* gtk/gtk-symbols : alias GtkType to GType
	* sources/gtk-sharp-sources.xml : create .raw files. They are now
	transformed to .xml files by the metadata compilation step.

svn path=/trunk/gtk-sharp/; revision=23967
2004-03-12 21:18:11 +00:00

38 lines
714 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("glibsharpglue")]
static extern IntPtr gtksharp_error_get_message (IntPtr errptr);
public override string Message {
get {
return Marshal.PtrToStringAnsi (gtksharp_error_get_message (errptr));
}
}
[DllImport("libglib-2.0-0.dll")]
static extern void g_clear_error (ref IntPtr errptr);
~GException ()
{
g_clear_error (ref errptr);
}
}
}