Files
UnrealEngineUWP/Engine/Source/Programs/Shared/EpicGames.Perforce/PerforceException.cs
Ben Marsh 508c144999 Horde: Last batch (hopefully) of static analysis fixes/suppressions.
#preflight 623e144c8073508cfc117a87

[CL 19517822 by Ben Marsh in ue5-main branch]
2022-03-25 15:35:47 -04:00

47 lines
1.0 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
namespace EpicGames.Perforce
{
/// <summary>
/// Represents an exception specific to perforce
/// </summary>
public class PerforceException : Exception
{
/// <summary>
/// For errors returned by the server, contains the error record
/// </summary>
public PerforceError? Error { get; set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="message">Message for the exception</param>
public PerforceException(string message)
: base(message)
{
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="format">Format string</param>
/// <param name="args">Arguments for the formatted string</param>
public PerforceException(string format, params object[] args)
: base(String.Format(format, args))
{
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="error">The error from the server</param>
public PerforceException(PerforceError error)
: base(error.ToString())
{
Error = error;
}
}
}