Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2012-06-04 11:41:56 +0400
committerMike Krüger <mkrueger@xamarin.com>2012-06-04 11:41:56 +0400
commitdac62a1f64625de713bb4533fb6e6de8d4df4e76 (patch)
tree0c015f2f56bcba196a9fbea8bae6fc3f7a3ce0c0
parenta5de964c5880f19234f1c503dcfab23943d022bc (diff)
[NRefactory] Be more verbose on cecil loading errors.
-rw-r--r--main/contrib/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/contrib/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs b/main/contrib/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
index 8107a760e4..5e098cb195 100644
--- a/main/contrib/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
+++ b/main/contrib/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
@@ -1189,7 +1189,8 @@ namespace ICSharpCode.NRefactory.TypeSystem
IType ReadCustomAttributeFieldOrPropType()
{
ICompilation compilation = currentResolvedAssembly.Compilation;
- switch (ReadByte()) {
+ var b = ReadByte();
+ switch (b) {
case 0x02:
return compilation.FindType(KnownTypeCode.Boolean);
case 0x03:
@@ -1225,7 +1226,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
case 0x55: // enum
return ReadType();
default:
- throw new NotSupportedException();
+ throw new NotSupportedException(string.Format("Custom attribute type 0x{0:x} is not supported.", b));
}
}