From dddae1ac27276da83bd3bfe355d52072180d04e0 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 21 Nov 2010 14:24:34 +0000 Subject: [PATCH] Print diagnostic message when docfile translation fails. --- Source/Bind/GL2/Generator.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Source/Bind/GL2/Generator.cs b/Source/Bind/GL2/Generator.cs index af2735cc..8e32dece 100644 --- a/Source/Bind/GL2/Generator.cs +++ b/Source/Bind/GL2/Generator.cs @@ -743,18 +743,20 @@ namespace Bind.GL2 docfiles.Add(Path.GetFileName(file), file); } } + + string docfile = null; try { - string file = Settings.FunctionPrefix + f.WrappedDelegate.Name + ".xml"; - if (!docfiles.ContainsKey(file)) - file = Settings.FunctionPrefix + f.TrimmedName + ".xml"; - if (!docfiles.ContainsKey(file)) - file = Settings.FunctionPrefix + f.TrimmedName.TrimEnd(numbers) + ".xml"; + docfile = Settings.FunctionPrefix + f.WrappedDelegate.Name + ".xml"; + if (!docfiles.ContainsKey(docfile)) + docfile = Settings.FunctionPrefix + f.TrimmedName + ".xml"; + if (!docfiles.ContainsKey(docfile)) + docfile = Settings.FunctionPrefix + f.TrimmedName.TrimEnd(numbers) + ".xml"; string doc = null; - if (docfiles.ContainsKey(file)) + if (docfiles.ContainsKey(docfile)) { - doc = processor.ProcessFile(docfiles[file]); + doc = processor.ProcessFile(docfiles[docfile]); } if (doc == null) { @@ -783,8 +785,10 @@ namespace Bind.GL2 sw.WriteLine(doc); } - catch - { } + catch (Exception e) + { + Console.WriteLine("[Warning] Error processing file {0}: {1}", docfile, e.ToString()); + } } #endregion