diff --git a/src/Generator/Generators/CLI/CLISourcesTemplate.cs b/src/Generator/Generators/CLI/CLISourcesTemplate.cs index a624afd3..a1cb9fa1 100644 --- a/src/Generator/Generators/CLI/CLISourcesTemplate.cs +++ b/src/Generator/Generators/CLI/CLISourcesTemplate.cs @@ -943,7 +943,8 @@ namespace CppSharp.Generators.CLI param.Visit(marshal); if (string.IsNullOrEmpty(marshal.Context.Return)) - throw new Exception("Cannot marshal argument of function"); + throw new Exception(string.Format("Cannot marshal argument of function '{0}'", + function.QualifiedOriginalName)); if (!string.IsNullOrWhiteSpace(marshal.Context.SupportBefore)) Write(marshal.Context.SupportBefore);