MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Error Namespace Reference

Data Structures

class  FAssertion
 
class  FBlueprintStackTrace
 
class  FCppException
 
class  FCppStackTrace
 
class  FErrorManager
 
class  FUnavailable
 
class  IError
 
class  IPlainTextComponent
 
class  SErrorDisplay
 
class  SPlainTextDisplay
 
class  TCppException
 
struct  TMaybe
 

Concepts

concept  CError
 
concept  CErrorRef
 
concept  CErrorPtr
 
concept  CErrorRefOrPtr
 
concept  CSharedError
 

Typedefs

using IErrorRef = TSharedRef<IError>
 
using IErrorPtr = TSharedPtr<IError>
 
using IErrorWeakPtr = TWeakPtr<IError>
 
using FNamedError = TPair<FString, IErrorRef>
 
using FCanFail = TMaybe<FVoid>
 
using FTrueOrReason = TMaybe<FVoid>
 

Enumerations

enum class  EErrorSeverity { ErrorComponent = -1 , Recoverable , Fatal , Crashing }
 

Functions

FORCEINLINE FCanFail Success ()
 

Detailed Description

Contains utilities for structured error handling

Typedef Documentation

◆ FCanFail

Indicate that an otherwise void function that it may fail with an IError.

Definition at line 581 of file Error.h.

◆ FNamedError

using Mcro::Error::FNamedError = TPair<FString, IErrorRef>

Definition at line 29 of file Error.Fwd.h.

◆ FTrueOrReason

Syntactically same as FCanFail but for functions which is explicitly used to query some boolean decidable thing, and which can also provide a reason why the queried thing is false.

Definition at line 587 of file Error.h.

◆ IErrorPtr

using Mcro::Error::IErrorPtr = TSharedPtr<IError>

Convenience alias for an instance of an error

Definition at line 26 of file Error.Fwd.h.

◆ IErrorRef

using Mcro::Error::IErrorRef = TSharedRef<IError>

Convenience alias for an instance of an error

Definition at line 25 of file Error.Fwd.h.

◆ IErrorWeakPtr

Convenience alias for an instance of an error

Definition at line 27 of file Error.Fwd.h.

Enumeration Type Documentation

◆ EErrorSeverity

enum class Mcro::Error::EErrorSeverity
strong

Indicate the severity of an error and at what discretion the caller may treat it.

Enumerator
ErrorComponent -1 

Indicates that an inner error just contains extra context for a real error

Recoverable  

The caller can handle the error and may continue execution, for example errors with telemetry.

Fatal  

A sub-program (like PIE) or a thread should abort its entire purpose but it should not crash the entire encompassing application, for example early runtime checks about the correctness of some required configuration.

Crashing  

The application has arrived to an invalid state from which recovery is impossible, for example access violation errors.

Definition at line 52 of file Error.Fwd.h.

Function Documentation

◆ Success()

FORCEINLINE FCanFail Mcro::Error::Success ( )

Return an FCanFail or FTrueOrReason indicating a success or truthy output

Definition at line 590 of file Error.h.