libnx  v4.8.0
Data Structures | Enumerations | Functions
fatal.h File Reference

Fatal error (fatal:u) service IPC wrapper. More...

#include "../types.h"

Go to the source code of this file.

Data Structures

struct  FatalAarch64Context
 Struct for fatal Cpu context, 64-bit. More...
 
struct  FatalAarch32Context
 Struct for fatal Cpu context, 32-bit. More...
 
struct  FatalCpuContext
 

Enumerations

enum  FatalPolicy {
  FatalPolicy_ErrorReportAndErrorScreen = 0 ,
  FatalPolicy_ErrorReport = 1 ,
  FatalPolicy_ErrorScreen = 2
}
 Type of thrown fatal error. More...
 

Functions

void fatalThrow (Result err)
 Triggers a system fatal error. More...
 
void fatalThrowWithPolicy (Result err, FatalPolicy type)
 Triggers a system fatal error with a custom FatalPolicy. More...
 
void fatalThrowWithContext (Result err, FatalPolicy type, FatalCpuContext *ctx)
 Triggers a system fatal error with a custom FatalPolicy and FatalCpuContext. More...
 

Detailed Description

Fatal error (fatal:u) service IPC wrapper.

Author
plutoo

Enumeration Type Documentation

◆ FatalPolicy

Type of thrown fatal error.

Enumerator
FatalPolicy_ErrorScreen 

Only available with [3.0.0+]. If specified, FatalPolicy_ErrorReportAndErrorScreen will be used instead on pre-3.0.0.

Function Documentation

◆ fatalThrow()

void fatalThrow ( Result  err)

Triggers a system fatal error.

Parameters
[in]errResult code to throw.
Note
This function does not return.
This uses fatalThrowWithPolicy with FatalPolicy_ErrorScreen internally.

◆ fatalThrowWithContext()

void fatalThrowWithContext ( Result  err,
FatalPolicy  type,
FatalCpuContext ctx 
)

Triggers a system fatal error with a custom FatalPolicy and FatalCpuContext.

Parameters
[in]errResult code to throw.
[in]typeType of fatal error to throw.
[in]ctxCpu context for fatal error to throw.
Note
This function may not return, depending on FatalPolicy.

◆ fatalThrowWithPolicy()

void fatalThrowWithPolicy ( Result  err,
FatalPolicy  type 
)

Triggers a system fatal error with a custom FatalPolicy.

Parameters
[in]errResult code to throw.
[in]typeType of fatal error to throw.
Note
This function may not return, depending on FatalPolicy.