mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 03:45:28 +00:00
Throw a more helpful exception for missing GetType.
* generator/InterfaceGen.cs: if we don't have a GetType method, it's a fatal situation. Throw an exception that identifies the iface in question.
This commit is contained in:
parent
955cdcf123
commit
0d44b5e973
|
@ -159,6 +159,8 @@ namespace GtkSharp.Generation {
|
||||||
void GenerateGType (StreamWriter sw)
|
void GenerateGType (StreamWriter sw)
|
||||||
{
|
{
|
||||||
Method m = GetMethod ("GetType");
|
Method m = GetMethod ("GetType");
|
||||||
|
if (m == null)
|
||||||
|
throw new Exception ("Interface " + QualifiedName + " missing GetType method.");
|
||||||
m.GenerateImport (sw);
|
m.GenerateImport (sw);
|
||||||
sw.WriteLine ("\t\tprivate static GLib.GType _gtype = new GLib.GType ({0} ());", m.CName);
|
sw.WriteLine ("\t\tprivate static GLib.GType _gtype = new GLib.GType ({0} ());", m.CName);
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
|
|
Loading…
Reference in a new issue