UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NetErrorContext.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "UObject/NameTypes.h"
6
8
9namespace UE::Net
10{
11
12// Some common errors. Licensees should add their own headers if they want to easily share errors between files.
20
22{
23public:
24
25 bool HasError() const;
26
28 IRISCORE_API void SetError(const FName Error);
29
30 FName GetError() const { return Error; }
31
33
34 const FNetRefHandle& GetObjectHandle() const { return ObjectHandle; }
35
36private:
37
38 FNetRefHandle ObjectHandle;
39 FName Error;
40};
41
42inline bool FNetErrorContext::HasError() const
43{
44 return !Error.IsNone();
45}
46
47}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition NameTypes.h:617
FORCEINLINE bool IsNone() const
Definition NameTypes.h:827
Definition NetErrorContext.h:22
bool HasError() const
Definition NetErrorContext.h:42
IRISCORE_API void SetError(const FName Error)
Definition NetErrorContext.cpp:17
void SetObjectHandle(const FNetRefHandle &InObjectHandle)
Definition NetErrorContext.h:32
FName GetError() const
Definition NetErrorContext.h:30
const FNetRefHandle & GetObjectHandle() const
Definition NetErrorContext.h:34
Definition NetRefHandle.h:25
Definition NetworkVersion.cpp:28
const FName GNetError_InvalidValue("Invalid value")
Definition NetErrorContext.h:18
const FName GNetError_ArraySizeTooLarge("Array size is too large")
Definition NetErrorContext.h:15
const FName GNetError_BitStreamOverflow("BitStream overflow")
Definition NetErrorContext.h:13
const FName GNetError_BitStreamError("BitStream error")
Definition NetErrorContext.h:14
const FName GNetError_BrokenNetHandle("Broken NetHandle")
Definition NetErrorContext.h:17
const FName GNetError_InvalidNetHandle("Invalid NetHandle")
Definition NetErrorContext.h:16
const FName GNetError_InternalError("Internal error")
Definition NetErrorContext.h:19