distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
fatalErrorHook.h File Reference

fatalErrorHook() header More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void fatalErrorHook (const char *file, int line, const char *function, const char *message)
 Hook function called when fatal error is detected. More...
 

Detailed Description

fatalErrorHook() header

Author
Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Function Documentation

◆ fatalErrorHook()

void fatalErrorHook ( const char *  file,
int  line,
const char *  function,
const char *  message 
)

Hook function called when fatal error is detected.

This function is called at the beginning of fatalErrorHandler(). It may be used to put the system into a safe state, log the failure, reset the device, etc. After this function returns, the system is halted by calling abort() with masked interrupts.

Note
Use of this function is optional - it may be left undefined, in which case it will not be called.
Parameters
[in]fileis a null-terminated string with the name of file in which fatal error was detected
[in]lineis a line number at which fatal error was detected
[in]functionis a null-terminated string with function in which fatal error was detected
[in]messageis a null-terminated string with the message of fatal error
Here is the caller graph for this function: