//
// Copyright 2014-2015 Amazon.com,
// Inc. or its affiliates. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
using System;
namespace Amazon.CognitoSync.SyncManager
{
///
/// This exception is thrown when a service request failed due to network
/// connectivity problem.
///
#if !PCL
[Serializable]
#endif
public class NetworkException : SyncManagerException
{
///
/// Constructs a new NetworkException with the specified message and an existing exception object
///
public NetworkException(string detailMessage, Exception ex)
: base(detailMessage, ex)
{
}
///
/// Constructs a new NetworkException with the specified message
///
public NetworkException(string detailMessage)
: base(detailMessage)
{
}
///
/// Constructs a new NetworkException with an existing exception object
///
public NetworkException(Exception ex)
: base(ex.Message, ex)
{
}
#if !PCL
///
/// Constructs a new instance of the NetworkException 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.
/// The parameter is null.
/// The class name is null or is zero (0).
protected NetworkException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
#endif
}
}