MCRO
C++23 utilities for Unreal Engine.
|
#include <ErrorManager.h>
Data Structures | |
struct | FDisplayErrorArgs |
Public Types | |
enum | EDisplayErrorResult { Displayed , Suppressed_AnotherErrorOpen , Suppressed_CannotDisplayModalWindow } |
Public Member Functions | |
auto | DisplayError (IErrorRef const &error, FDisplayErrorArgs const &args) -> TFuture< EDisplayErrorResult > |
Static Public Member Functions | |
static FErrorManager & | Get () |
Global facilities for IError handling, including displaying them to the user, trigger error events, etc
Definition at line 21 of file ErrorManager.h.
The results of displaying an error. In all cases the error is logged.
Definition at line 29 of file ErrorManager.h.
auto Mcro::Error::FErrorManager::DisplayError | ( | IErrorRef const & | error, |
FDisplayErrorArgs const & | args ) -> TFuture< EDisplayErrorResult > |
Display the error summary for the user. Only use this when your program arrives to an unrecoverable state which either needs explanation for the user or requires action from the user (like configuration changes). The modal window and the widgets representing the error will be created on the main thread, keep that in mind while making the widgets for the errors.
error | The input error |
args | Simple arguments object for this function, use initializer list or C++ 20 designated initializer. |
bAsync
is set in the arguments, calling this function from any thread will also block the main thread while the modal window containing the error is open. If the calling thread also needs to be blocked then simply wait on the returned future.
|
static |
Get the global singleton