UnrealModFramework
Mod framework API
Toggle main menu visibility
Loading...
Searching...
No Matches
ModSourceFailure.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Nelaric Contributors
3
#pragma once
4
5
#include <span>
6
7
namespace
Mod::ExportMetadata
8
{
10
class
FSourceFailureScope
11
{
12
public
:
16
EXPORTMETADATA_API
explicit
FSourceFailureScope
(std::span<const unsigned int> DeclaredCodes)
noexcept
;
17
19
EXPORTMETADATA_API
~FSourceFailureScope
();
20
22
FSourceFailureScope
(
const
FSourceFailureScope
&) =
delete
;
24
FSourceFailureScope
&
operator=
(
const
FSourceFailureScope
&) =
delete
;
25
27
EXPORTMETADATA_API
static
void
Record
(
unsigned
int
Code)
noexcept
;
28
32
unsigned
int
GetError
() const noexcept
33
{
34
return
Error;
35
}
36
37
private
:
38
FSourceFailureScope
* Previous;
39
std::span<const unsigned int> Codes;
40
unsigned
int
Error = 0;
41
};
42
}
// namespace Mod::ExportMetadata
Mod::ExportMetadata::FSourceFailureScope
Captures the source errors declared by one generated native call.
Definition
ModSourceFailure.h:11
Mod::ExportMetadata::FSourceFailureScope::FSourceFailureScope
FSourceFailureScope(const FSourceFailureScope &)=delete
Disallows copying the active capture.
Mod::ExportMetadata::FSourceFailureScope::FSourceFailureScope
EXPORTMETADATA_API FSourceFailureScope(std::span< const unsigned int > DeclaredCodes) noexcept
Begins capturing errors for a generated native call.
Mod::ExportMetadata::FSourceFailureScope::~FSourceFailureScope
EXPORTMETADATA_API ~FSourceFailureScope()
Restores the previous failure capture on the calling thread.
Mod::ExportMetadata::FSourceFailureScope::Record
static EXPORTMETADATA_API void Record(unsigned int Code) noexcept
Records an explicit source error for the active native invocation.
Mod::ExportMetadata::FSourceFailureScope::GetError
unsigned int GetError() const noexcept
Reads the business status recorded for this invocation.
Definition
ModSourceFailure.h:32
Mod::ExportMetadata::FSourceFailureScope::operator=
FSourceFailureScope & operator=(const FSourceFailureScope &)=delete
Disallows replacing the active capture.
ModRuntime
Source
Runtime
ExportMetadata
Public
ModSourceFailure.h
Generated by
1.18.0