distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
fatalErrorHandler.cpp File Reference

fatalErrorHandler() implementation More...

Include dependency graph for fatalErrorHandler.cpp:

Functions

void fatalErrorHandler (const char *const file, const int line, const char *const function, const char *const message)
 Handler of fatal errors. More...
 

Detailed Description

fatalErrorHandler() implementation

Author
Copyright (C) 2016-2017 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

◆ fatalErrorHandler()

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

Handler of fatal errors.

This function is called via FATAL_ERROR() macro, which is used to supply some of the arguments. It calls weak fatalErrorHook() (only if it is defined) and halts the system by calling abort() with masked interrupts.

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 call graph for this function: