libnx/nx/include/switch/runtime/diag.h
fincs 970d982e57
Add diagAbortWithResult, see details:
- This is a (weak/overridable) function meant to be called when the
  program encounters an unrecoverable error, but it's not fatal enough
  to bring down the entire system with it.
- The default implementation uses svcBreak, passing the result code
  in the user buffer.
- Replaced all usages of fatalThrow with diagAbortWithResult throughout
  the entire library.
2020-10-29 13:40:35 +01:00

16 lines
315 B
C

/**
* @file diag.h
* @brief Debugging and diagnostics utilities
* @author fincs
* @copyright libnx Authors
*/
#pragma once
#include "../types.h"
#include "../result.h"
/**
* @brief Aborts program execution with a result code.
* @param[in] res Result code.
*/
void NORETURN diagAbortWithResult(Result res);