MCPcopy Create free account
hub / github.com/devkitPro/libctru / ERRF_ThrowResult

Function ERRF_ThrowResult

libctru/source/errf.c:63–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63Result ERRF_ThrowResult(Result failure)
64{
65 ERRF_FatalErrInfo error;
66 Result ret;
67
68 if (R_FAILED(ret = errfInit()))
69 return ret;
70
71 memset(&error, 0, sizeof(error));
72
73 error.type = ERRF_ERRTYPE_GENERIC;
74
75 // pcAddr is not used by ErrDisp for ERRF_ERRTYPE_FAILURE
76 error.pcAddr = (u32)__builtin_extract_return_addr(__builtin_return_address(0));
77 getCommonErrorData(&error, failure);
78
79 ret = ERRF_Throw(&error);
80
81 errfExit();
82
83 return ret;
84}
85
86Result ERRF_LogResult(Result failure)
87{

Callers

nothing calls this directly

Calls 4

errfInitFunction · 0.85
getCommonErrorDataFunction · 0.85
ERRF_ThrowFunction · 0.85
errfExitFunction · 0.85

Tested by

no test coverage detected