summaryrefslogtreecommitdiff
path: root/modules/mono/editor/GodotTools
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2020-01-20 19:08:08 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2020-01-20 19:08:08 +0100
commite4330e33e6eee2da7f4460c0aef3751dca6a57a2 (patch)
treed90334888259e3c5063d9c03ebcf91b0ad8cb36e /modules/mono/editor/GodotTools
parentfa638a290fccdd12652bdab9d9890e4d3d6b41e2 (diff)
Mono/C#: Fix error when parsing nested generics
Also fixed the editor not including the parse error message in the error.
Diffstat (limited to 'modules/mono/editor/GodotTools')
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs
index 80e45b3a3c..11afa8773e 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs
@@ -25,14 +25,14 @@ namespace GodotTools.Internals
}
[MethodImpl(MethodImplOptions.InternalCall)]
- private static extern Error internal_ParseFile(string filePath, Array<Dictionary> classes);
+ private static extern Error internal_ParseFile(string filePath, Array<Dictionary> classes, out string errorStr);
public static void ParseFileOrThrow(string filePath, out IEnumerable<ClassDecl> classes)
{
var classesArray = new Array<Dictionary>();
- var error = internal_ParseFile(filePath, classesArray);
+ var error = internal_ParseFile(filePath, classesArray, out string errorStr);
if (error != Error.Ok)
- throw new Exception($"Failed to determine namespace and class for script: {filePath}. Parse error: {error}");
+ throw new Exception($"Failed to determine namespace and class for script: {filePath}. Parse error: {errorStr ?? error.ToString()}");
var classesList = new List<ClassDecl>();