Browse Source

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

pull/18/head
Siegfried Pammer 14 years ago
parent
commit
c1db2490f8
  1. 2
      src/Libraries/NewNRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

2
src/Libraries/NewNRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

@ -1926,7 +1926,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