From c41d195b88cfa393c4aa27a5161af0ae77192fb4 Mon Sep 17 00:00:00 2001 From: triton Date: Mon, 13 Jan 2014 16:51:12 +0000 Subject: [PATCH] Improved the exception message for marshaling failures. --- src/Generator/Generators/CLI/CLISourcesTemplate.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);