Navigation
API > API/Plugins > API/Plugins/OnlineSubsystem
Generic Error response for OSS calls
| Name | FOnlineError |
| Type | struct |
| Header File | /Engine/Plugins/Online/OnlineSubsystem/Source/Public/OnlineError.h |
| Include Path | #include "OnlineError.h" |
Syntax
struct FOnlineError
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FOnlineError
(
const int32 ErrorCode |
OnlineError.h | ||
FOnlineError
(
EOnlineErrorResult InResult, |
Ctors. Use ONLINE_ERROR macro instead | OnlineError.h | |
FOnlineError
(
const FText& ErrorMessage |
OnlineError.h | ||
FOnlineError
(
FString&& ErrorCode |
OnlineError.h | ||
FOnlineError
(
const FString& ErrorCode |
OnlineError.h | ||
FOnlineError
(
bool bSucceeded |
OnlineError.h | ||
FOnlineError
(
EOnlineErrorResult InResult |
OnlineError.h | ||
FOnlineError
(
const TCHAR*const ErrorCode |
OnlineError.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bSucceeded | bool | Did the request succeed fully. If this is true the rest of the struct probably doesn't matter | OnlineError.h | |
| ErrorCode | FString | Intended to be interpreted by code. | OnlineError.h | |
| ErrorMessage | FText | Suitable for display to end user. Guaranteed to be in the current locale (or empty) | OnlineError.h | |
| ErrorRaw | FString | The raw unparsed error message from server. | OnlineError.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FString & GetErrorCode() |
OnlineError.h | ||
FString GetErrorLegacy() |
Prints out everything, need something like this!!! | OnlineError.h | |
const FText & GetErrorMessage() |
OnlineError.h | ||
const FString & GetErrorRaw() |
OnlineError.h | ||
EOnlineErrorResult GetErrorResult() |
Accessors | OnlineError.h | |
FOnlineError & SetErrorRaw
(
const FString& Val |
Setters for adding the raw error | OnlineError.h | |
void SetFromErrorCode
(
FString&& ErrorCode |
OnlineError.h | ||
void SetFromErrorCode
(
const int32 ErrorCode |
OnlineError.h | ||
void SetFromErrorCode
(
const FString& ErrorCode |
Same as the Ctors but can be called any time (does NOT set bSucceeded to false) | OnlineError.h | |
void SetFromErrorMessage
(
const FText& ErrorMessage, |
OnlineError.h | ||
void SetFromErrorMessage
(
const FText& ErrorMessage |
OnlineError.h | ||
FString ToLogString() |
Call this if you want to log this out (will pick the best string representation) | OnlineError.h | |
bool WasSuccessful() |
OnlineError.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FOnlineError & SetErrorCode
(
const FString& Val |
OnlineError.h | ||
FOnlineError & SetErrorMessage
(
const FText& Val |
OnlineError.h | ||
void SetFromErrorCode
(
EOnlineErrorResult InResult |
Helpers for constructing errors | OnlineError.h | |
void SetFromErrorCode
(
EOnlineErrorResult InResult, |
OnlineError.h | ||
void SetFromErrorCode
(
EOnlineErrorResult InResult, |
OnlineError.h | ||
FOnlineError & SetResult
(
EOnlineErrorResult Val |
Setters for updating individual values directly | OnlineError.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FOnlineError CreateError
(
const FString& ErrorNamespace, |
Create factory for proper namespacing. Use ONLINE_ERROR macro | OnlineError.h | |
static FOnlineError CreateError
(
const FString& ErrorNamespace, |
Use a default error code / display text | OnlineError.h | |
static FString DefaultErrorCode
(
EOnlineErrorResult Result |
OnlineError.h | ||
static FText DefaultErrorMsg
(
EOnlineErrorResult Result |
Default messaging for common errors | OnlineError.h | |
static const FString & GetDefaultErrorNamespace() |
Default namespace for online errors | OnlineError.h | |
static const FString GetGenericErrorCode() |
Code useful when all you have is raw error info from old APIs | OnlineError.h | |
static const FOnlineError & Success() |
Helpers for the most common error types | OnlineError.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FOnlineError& Other |
OnlineError.h | ||
FOnlineError operator+
(
const FOnlineError& RHS |
OnlineError.h | ||
FOnlineError operator+
(
const FString& RHS |
OnlineError.h | ||
FOnlineError & operator+=
(
const FOnlineError& RHS |
OnlineError.h | ||
FOnlineError & operator+=
(
const FString& RHS |
OnlineError.h | ||
bool operator==
(
const FOnlineError& Other |
OnlineError.h |