1 //------------------------------------------------------------------------------
2 // <copyright file="ExceptionUtil.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //------------------------------------------------------------------------------
7 namespace System.Web.Util {
11 static internal class ExceptionUtil {
12 static internal ArgumentException ParameterInvalid(string parameter) {
13 return new ArgumentException(SR.GetString(SR.Parameter_Invalid, parameter), parameter);
16 static internal ArgumentException ParameterNullOrEmpty(string parameter) {
17 return new ArgumentException(SR.GetString(SR.Parameter_NullOrEmpty, parameter), parameter);
20 static internal ArgumentException PropertyInvalid(string property) {
21 return new ArgumentException(SR.GetString(SR.Property_Invalid, property), property);
24 static internal ArgumentException PropertyNullOrEmpty(string property) {
25 return new ArgumentException(SR.GetString(SR.Property_NullOrEmpty, property), property);
28 static internal InvalidOperationException UnexpectedError(string methodName) {
29 return new InvalidOperationException(SR.GetString(SR.Unexpected_Error, methodName));