// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tools.DotNETCommon.Perforce
{
///
/// Represents an exception specific to perforce
///
public class PerforceException : Exception
{
///
/// For errors returned by the server, contains the error record
///
public PerforceError Error;
///
/// Constructor
///
/// Message for the exception
public PerforceException(string Message)
: base(Message)
{
}
///
/// Constructor
///
/// Format string
/// Arguments for the formatted string
public PerforceException(string Format, params object[] Args)
: base(String.Format(Format, Args))
{
}
///
/// Constructor
///
/// The error from the server
public PerforceException(PerforceError Error)
: base(Error.ToString())
{
this.Error = Error;
}
}
}