summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/ArgumentException.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-13 14:17:19 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-13 14:17:19 +0900
commita56e30c8d33048216567753d9d3fefc2152af8ac (patch)
tree7e5d979695fc4a431740982eb1cfecc2898b23a5 /src/mscorlib/src/System/ArgumentException.cs
parent4b11dc566a5bbfa1378d6266525c281b028abcc8 (diff)
downloadcoreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.gz
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.bz2
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.zip
Imported Upstream version 2.0.0.11353upstream/2.0.0.11353
Diffstat (limited to 'src/mscorlib/src/System/ArgumentException.cs')
-rw-r--r--src/mscorlib/src/System/ArgumentException.cs97
1 files changed, 0 insertions, 97 deletions
diff --git a/src/mscorlib/src/System/ArgumentException.cs b/src/mscorlib/src/System/ArgumentException.cs
deleted file mode 100644
index fe054a9aa0..0000000000
--- a/src/mscorlib/src/System/ArgumentException.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for invalid arguments to a method.
-**
-**
-=============================================================================*/
-
-using System.Globalization;
-using System.Runtime.Serialization;
-
-namespace System
-{
- // The ArgumentException is thrown when an argument does not meet
- // the contract of the method. Ideally it should give a meaningful error
- // message describing what was wrong and which parameter is incorrect.
- //
- [Serializable]
- public class ArgumentException : SystemException, ISerializable
- {
- private String _paramName;
-
- // Creates a new ArgumentException with its message
- // string set to the empty string.
- public ArgumentException()
- : base(SR.Arg_ArgumentException)
- {
- HResult = __HResults.COR_E_ARGUMENT;
- }
-
- // Creates a new ArgumentException with its message
- // string set to message.
- //
- public ArgumentException(String message)
- : base(message)
- {
- HResult = __HResults.COR_E_ARGUMENT;
- }
-
- public ArgumentException(String message, Exception innerException)
- : base(message, innerException)
- {
- HResult = __HResults.COR_E_ARGUMENT;
- }
-
- public ArgumentException(String message, String paramName, Exception innerException)
- : base(message, innerException)
- {
- _paramName = paramName;
- HResult = __HResults.COR_E_ARGUMENT;
- }
-
- public ArgumentException(String message, String paramName)
- : base(message)
- {
- _paramName = paramName;
- HResult = __HResults.COR_E_ARGUMENT;
- }
-
- protected ArgumentException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- _paramName = info.GetString("ParamName");
- }
-
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- base.GetObjectData(info, context);
- info.AddValue("ParamName", _paramName, typeof(String));
- }
-
- public override String Message
- {
- get
- {
- String s = base.Message;
- if (!String.IsNullOrEmpty(_paramName))
- {
- String resourceString = SR.Format(SR.Arg_ParamName_Name, _paramName);
- return s + Environment.NewLine + resourceString;
- }
- else
- return s;
- }
- }
-
- public virtual String ParamName
- {
- get { return _paramName; }
- }
- }
-}