#if NET20 || NET30 || NET35 || !NET_4_6 // 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. using System.Runtime.Serialization; namespace System.Threading.Tasks { /// /// Represents an exception used to communicate an invalid operation by a /// . /// [Serializable] public class TaskSchedulerException : Exception { /// /// Initializes a new instance of the class. /// public TaskSchedulerException() : base("TaskSchedulerException") { } /// /// Initializes a new instance of the /// class with a specified error message. /// /// The error message that explains the reason for the exception. public TaskSchedulerException(string message) : base(message) { } /// /// Initializes a new instance of the /// class using the default error message and a reference to the inner exception that is the cause of /// this exception. /// /// The exception that is the cause of the current exception. public TaskSchedulerException(Exception innerException) : base("TaskSchedulerException", innerException) { } /// /// Initializes a new instance of the /// class with a specified error message and a reference to the inner exception that is the cause of /// this exception. /// /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception. public TaskSchedulerException(string message, Exception innerException) : base(message, innerException) { } /// /// Initializes a new instance of the /// class with serialized data. /// /// The that holds /// the serialized object data about the exception being thrown. /// The that /// contains contextual information about the source or destination. protected TaskSchedulerException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } #endif