// Copyright 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 { /// /// Base class for user-facing fatal errors. These errors are shown to the user prior to termination, without a callstack, and may dictate the program exit code. /// [Obsolete("Functionality in the Tools.DotNETCommon namespace is deprecated. Please reference the EpicGames.Core namespace and assembly instead.")] public class FatalErrorException : Exception { /// /// Exit code for the process /// public int ExitCode = 1; /// /// Constructor /// /// The error message to display. public FatalErrorException(string Message) : base(Message) { } /// /// Constructor /// /// An inner exception to wrap /// The error message to display. public FatalErrorException(Exception InnerException, string Message) : base(Message, InnerException) { } /// /// Constructor /// /// Formatting string for the error message /// Arguments for the formatting string public FatalErrorException(string Format, params object[] Arguments) : base(String.Format(Format, Arguments)) { } /// /// Constructor which wraps another exception /// /// The inner exception being wrapped /// Format for the message string /// Format arguments public FatalErrorException(Exception InnerException, string Format, params object[] Arguments) : base(String.Format(Format, Arguments), InnerException) { } /// /// Returns the string representing the exception. Our build exceptions do not show the callstack since they are used to report known error conditions. /// /// Message for the exception public override string ToString() { return Message; } } }