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