SafetyHook
Loading...
Searching...
No Matches
MidHook::Error Struct Reference

Error type for MidHook. More...

#include <mid_hook.hpp>

Public Types

enum  : uint8_t { BAD_ALLOCATION , BAD_INLINE_HOOK }
 The type of error.
 

Static Public Member Functions

static Error bad_allocation (Allocator::Error err)
 Create a BAD_ALLOCATION error.
 
static Error bad_inline_hook (InlineHook::Error err)
 Create a BAD_INLINE_HOOK error.
 

Public Attributes

enum safetyhook::MidHook::Error:: { ... }  type
 The type of error.
 
union { 
 
   Allocator::Error   allocator_error 
 Allocator error information.
 
   InlineHook::Error   inline_hook_error 
 InlineHook error information.
 
};  
 Extra error information.
 

Detailed Description

Error type for MidHook.

Member Function Documentation

◆ bad_allocation()

static Error safetyhook::MidHook::Error::bad_allocation ( Allocator::Error err)
inlinestaticnodiscard

Create a BAD_ALLOCATION error.

Parameters
errThe Allocator::Error that failed.
Returns
The new BAD_ALLOCATION error.

◆ bad_inline_hook()

static Error safetyhook::MidHook::Error::bad_inline_hook ( InlineHook::Error err)
inlinestaticnodiscard

Create a BAD_INLINE_HOOK error.

Parameters
errThe InlineHook::Error that failed.
Returns
The new BAD_INLINE_HOOK error.

The documentation for this struct was generated from the following file: