internal Exception resolve_token_exception (int metadataToken, ResolveTokenError error, string tokenType) {
if (error == ResolveTokenError.OutOfRange)
return new ArgumentOutOfRangeException ("metadataToken", String.Format ("Token 0x{0:x} is not valid in the scope of module {1}", metadataToken, name));
else
return new ArgumentException (String.Format ("Token 0x{0:x} is not a valid {1} token in the scope of module {2}", metadataToken, tokenType, name), "metadataToken");
}