Merge pull request #3144 from Unity-Technologies/fix-recursive-property-call
[mono.git] / mcs / class / referencesource / System.Web / Util / ExceptionUtil.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="ExceptionUtil.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6
7 namespace System.Web.Util {
8     using System;
9     using System.Web;
10
11     static internal class ExceptionUtil {
12         static internal ArgumentException ParameterInvalid(string parameter) {
13             return new ArgumentException(SR.GetString(SR.Parameter_Invalid, parameter), parameter);
14         }
15
16         static internal ArgumentException ParameterNullOrEmpty(string parameter) {
17             return new ArgumentException(SR.GetString(SR.Parameter_NullOrEmpty, parameter), parameter);
18         }
19
20         static internal ArgumentException PropertyInvalid(string property) {
21             return new ArgumentException(SR.GetString(SR.Property_Invalid, property), property);
22         }
23
24         static internal ArgumentException PropertyNullOrEmpty(string property) {
25             return new ArgumentException(SR.GetString(SR.Property_NullOrEmpty, property), property);
26         }
27
28         static internal InvalidOperationException UnexpectedError(string methodName) {
29             return new InvalidOperationException(SR.GetString(SR.Unexpected_Error, methodName));
30         }
31     }
32 }
33