// Copyright Epic Games, Inc. All Rights Reserved. using System; namespace EpicGames.Perforce { /// /// Represents an exception specific to perforce /// public class PerforceException : Exception { /// /// For errors returned by the server, contains the error record /// public PerforceError? Error { get; set; } /// /// 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()) { Error = error; } /// /// Constructor /// public PerforceException(string message, PerforceException innerException) : base(message, innerException) { Error = innerException.Error; } } }