aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/ThrowHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProtocolBuffers/ThrowHelper.cs')
-rw-r--r--src/ProtocolBuffers/ThrowHelper.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ProtocolBuffers/ThrowHelper.cs b/src/ProtocolBuffers/ThrowHelper.cs
index c854a777..f04a7f16 100644
--- a/src/ProtocolBuffers/ThrowHelper.cs
+++ b/src/ProtocolBuffers/ThrowHelper.cs
@@ -79,5 +79,14 @@ namespace Google.ProtocolBuffers
}
}
}
+
+ public static Exception CreateMissingMethod(Type type, string methodName)
+ {
+#if SILVERLIGHT
+ return new MissingMethodException(String.Format("The method '{0}' was not found on type {1}", methodName, type));
+#else
+ return new MissingMethodException(String.Format("{0}", type), methodName);
+#endif
+ }
}
} \ No newline at end of file