Skip to content

Commit

Permalink
handle possible exceptions while processing members.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Dec 23, 2014
1 parent 6fbae81 commit e8a6fc3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/FSharp.MetadataFormat/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ module Reader =

let getXmlDocSigForMember (memb:FSharpMemberFunctionOrValue) =
let memberName =
try
let name = memb.CompiledName.Replace(".ctor", "#ctor")
let typeGenericParameters =
memb.EnclosingEntity.GenericParameters |> Seq.mapi (fun num par -> par.Name, sprintf "`%d" num)
Expand Down Expand Up @@ -599,6 +600,9 @@ module Reader =
"(" + System.String.Join(",", paramTypeList) + ")"
else ""
sprintf "%s%s%s" name typeargs paramList
with exn ->
printfn "Error while building member-name for %s because: %s" memb.FullName exn.Message
memb.CompiledName
match (memb.XmlDocSig, memb.EnclosingEntity.TryFullName) with
| "", None -> ""
| "", Some(n) -> sprintf "%s:%s.%s" (getMemberXmlDocsSigPrefix memb) n memberName
Expand Down

0 comments on commit e8a6fc3

Please sign in to comment.