Browse Source

NRefactory 5: do not throw exceptions if there's no cecil reference for entity

newNRvisualizers
Siegfried Pammer 14 years ago committed by Daniel Grunwald
parent
commit
5ff4462b2b
  1. 2
      ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

2
ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

@ -1944,7 +1944,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
throw new NotSupportedException ("This instance contains no cecil references."); throw new NotSupportedException ("This instance contains no cecil references.");
object result; object result;
if (!typeSystemTranslationTable.TryGetValue (typeSystemObject, out result)) if (!typeSystemTranslationTable.TryGetValue (typeSystemObject, out result))
throw new InvalidOperationException ("No cecil reference stored for " + typeSystemObject); return null;
return result as T; return result as T;
} }

Loading…
Cancel
Save