System.InvalidOperationException: Unexpected name type

7 views
Skip to first unread message

Bill Barry

unread,
Mar 19, 2009, 4:01:20 PM3/19/09
to docu
I am trying to run this on a local assembly that I have and I am
receiving the following exception. The assembly is .NET 3.5 and makes
use of lambdas, anonymous types, generics, and extension methods.

Unhandled Exception: System.InvalidOperationException: Unexpected name
type
at Docu.Parsing.Model.Identifier.FromString(String name) in C:\Users
\Administrator\dev\docu\src\Docu.Console\Parsing\Model
\Identifier.cs:line 62
at Docu.Parsing.CommentContentParser.ParseSee(XmlNode content) in C:
\Users\Administrator\dev\docu\src\Docu.Console\Parsing
\CommentContentParser.cs:line 69
at Docu.Parsing.CommentContentParser.Parse(XmlNode content) in C:
\Users\Administrator\dev\docu\src\Docu.Console\Parsing
\CommentContentParser.cs:line 38
at Docu.Documentation.DocumentModel.AddType(List`1 namespaces,
List`1 references, DocumentedType association) in C:\Users
\Administrator\dev\docu\src\Docu.Console\Documentation
\DocumentModel.cs:line 222
at Docu.Documentation.DocumentModel.Create(IEnumerable`1 members)
in C:\Users\Administrator\dev\docu\src\Docu.Console\Documentation
\DocumentModel.cs:line 36
at Docu.Parsing.AssemblyXmlParser.CreateDocumentModel(IEnumerable`1
assemblies, IEnumerable`1 xml) in C:\Users\Administrator\dev\docu\src
\Docu.Console\Parsing\AssemblyXmlParser.cs:line 28
at Docu.DocumentationGenerator.Generate() in C:\Users\Administrator
\dev\docu\src\Docu.Console\DocumentationGenerator.cs:line 70
at Docu.Console.ConsoleApplication.Run() in C:\Users\Administrator
\dev\docu\src\Docu.Console\Console\ConsoleApplication.cs:line 60
at Docu.Console.ConsoleApplication.Run(IEnumerable`1 args) in C:
\Users\Administrator\dev\docu\src\Docu.Console\Console
\ConsoleApplication.cs:line 29
at Docu.Program.Main(String[] args) in C:\Users\Administrator\dev
\docu\src\Docu.Console\Program.cs:line 9

James Gregory

unread,
Mar 19, 2009, 7:00:18 PM3/19/09
to docu-...@googlegroups.com
Very interesting... I'd hazard a guess that it's probably falling over on one of the wierd compiler generated names that lambdas and such produce. Is this an assembly I could have a look at (offline perhaps)? I know that's probably a bit much to ask.

Alternatively, I'll try to make the exceptions a bit more descriptive so you'll be able to find out exactly which type it's falling over on and relay that back to me.

I've created an issue for making exceptions more helpful.

James Gregory

unread,
Mar 19, 2009, 7:03:12 PM3/19/09
to docu-...@googlegroups.com
Actually, I just looked at the exception message again. That code is rather stupidly designed! I'm only handling a subset of the available documentation types (types, namespaces, methods, and properties) but there are others... instead of just ignoring the others I'm stupidly throwing this exception.

Could you do me a favor and just verify what I think will be happening. If you have a look in the XML file that's being used, and do a search for E: and F: if either of those come up then that's what will be causing the exception.

Bill Barry

unread,
Mar 20, 2009, 9:45:11 AM3/20/09
to docu-...@googlegroups.com
James Gregory wrote:
Could you do me a favor and just verify what I think will be happening. If you have a look in the XML file that's being used, and do a search for E: and F: if either of those come up then that's what will be causing the exception.
I am using both events and fields.

James Gregory

unread,
Mar 20, 2009, 8:54:40 PM3/20/09
to docu-...@googlegroups.com
I thought as much. I'm working on supporting these two types, and also making the parser a bit more robust so it doesn't choke on types it doesn't support. I actually think once these two are covered then that's everything, but the robustness will be nice in-case I have forgotten any more, or more are introduced in the future.

I'll let you know when these changes are published.
Reply all
Reply to author
Forward
0 new messages