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

FATAL_ERROR() macro. More...

Include dependency graph for FATAL_ERROR.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FATAL_ERROR_FUNCTION   __PRETTY_FUNCTION__
 name of function in which fatal error was detected More...
 
#define FATAL_ERROR(message)   fatalErrorHandler(__FILE__, __LINE__, FATAL_ERROR_FUNCTION, (message))
 Macro used for handling fatal errors - wrapper for fatalErrorHandler() More...
 

Detailed Description

FATAL_ERROR() macro.

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/.

Macro Definition Documentation

◆ FATAL_ERROR

#define FATAL_ERROR (   message)    fatalErrorHandler(__FILE__, __LINE__, FATAL_ERROR_FUNCTION, (message))

Macro used for handling fatal errors - wrapper for fatalErrorHandler()

Parameters
[in]messageis the message of fatal error

◆ FATAL_ERROR_FUNCTION

#define FATAL_ERROR_FUNCTION   __PRETTY_FUNCTION__

name of function in which fatal error was detected

Depending on the context it wraps:

  • __PRETTY_FUNCTION__ for C++ (assumes that GCC is used),
  • __func__ for C99,
  • __FUNCTION__ otherwise (assumes that GCC is used).