UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
InstallerError.fake.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
#pragma once
3
4
#include "
Installer/InstallerError.h
"
5
#include "
Interfaces/IBuildInstaller.h
"
6
7
#if WITH_DEV_AUTOMATION_TESTS
8
9
namespace
BuildPatchServices
10
{
11
class
FFakeInstallerError
12
:
public
IInstallerError
13
{
14
public
:
15
virtual
bool
HasError()
const override
16
{
17
return
bHasError;
18
}
19
20
virtual
bool
IsCancelled()
const override
21
{
22
return
bIsCancelled;
23
}
24
25
virtual
bool
CanRetry()
const override
26
{
27
return
bCanRetry
;
28
}
29
30
virtual
EBuildPatchInstallError
GetErrorType()
const override
31
{
32
return
ErrorType;
33
}
34
35
virtual
FString GetErrorCode()
const override
36
{
37
return
ErrorCode;
38
}
39
40
virtual
FText
GetErrorText()
const override
41
{
42
return
ErrorText;
43
}
44
45
virtual
void
SetError(
EBuildPatchInstallError
InErrorType
,
const
TCHAR
*
InErrorSubType
,
uint32
InErrorCode
,
FText
InErrorText
)
override
46
{
47
ErrorType =
InErrorType
;
48
ErrorCode =
InErrorSubType
+ ((
InErrorCode
> 0) ? FString::Printf(
TEXT
(
"-%u"
),
InErrorCode
) :
TEXT
(
""
));
49
ErrorText =
MoveTemp
(
InErrorText
);
50
}
51
52
virtual
int32
RegisterForErrors(FOnErrorDelegate Delegate)
53
{
54
int32
Handle
= HandleCount++;
55
Delegates
.Add(
Handle
, Delegate);
56
return
Handle
;
57
}
58
59
virtual
void
UnregisterForErrors(
int32
Handle
)
override
60
{
61
Delegates
.Remove(
Handle
);
62
}
63
64
virtual
void
Reset
()
override
65
{
66
bHasError =
false
;
67
bIsCancelled =
false
;
68
bCanRetry
=
true
;
69
ErrorType =
EBuildPatchInstallError::NoError
;
70
ErrorCode =
TEXT
(
""
);
71
ErrorText =
FText::GetEmpty
();
72
// To mimic real imp, delegates are kept.
73
}
74
75
public
:
76
bool
bHasError;
77
bool
bIsCancelled;
78
bool
bCanRetry
;
79
EBuildPatchInstallError
ErrorType;
80
FString ErrorCode;
81
FText
ErrorText;
82
TMap<int32, FOnErrorDelegate>
Delegates
;
83
int32
HandleCount;
84
};
85
}
86
87
#endif
//WITH_DEV_AUTOMATION_TESTS
TEXT
#define TEXT(x)
Definition
Platform.h:1272
TCHAR
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition
Platform.h:1135
int32
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition
Platform.h:1125
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
IBuildInstaller.h
EBuildPatchInstallError
EBuildPatchInstallError
Definition
IBuildInstaller.h:23
EBuildPatchInstallError::NoError
@ NoError
InstallerError.h
EPathFollowingVelocityMode::Reset
@ Reset
ESerializePropertyType::Handle
@ Handle
MoveTemp
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition
UnrealTemplate.h:520
uint32
uint32_t uint32
Definition
binka_ue_file_header.h:6
FText
Definition
Text.h:385
FText::GetEmpty
static CORE_API const FText & GetEmpty()
Definition
Text.cpp:252
TMap
Definition
UnrealString.h.inl:34
BuildPatchServices
Definition
BuildPatchFileConstructor.h:28
FNavigationSystem::Delegates
FDelegates Delegates
Definition
NavigationSystemBase.cpp:234
Engine
Source
Runtime
Online
BuildPatchServices
Private
Tests
Fake
InstallerError.fake.h
Generated by
1.9.8