# PhasicFlow: src/phasicFlow/globals/error.hpp File Reference
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

error.hpp File Reference
Include dependency graph for error.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces

| pFlow

## Macros

#define | fatalError fatalErrorMessage(__FILE__, __LINE__)
| Report a fatal error and exit the applicaiton. More...
#define | fatalErrorIn(functionName) fatalErrorInMessage((functionName), __FILE__, __LINE__)
| Report a fatal error and supplied function name and exit the application. More...
#define | fatalErrorInFunction fatalErrorIn(FUNCTION_NAME)
| Report a fatal error and function name and exit the application. More...
#define | Not_Implemented(functionName) notImplementedErrorMessage((functionName), __FILE__, __LINE__)
| Report that a function is yet not implemented with supplied function name. More...
#define | notImplementedFunction Not_Implemented(FUNCTION_NAME)
| Report that a function is yet not implemented. More...
#define | ioErrorInFile(fileName, lineNumber) ioErrorMessage(fileName, lineNumber, FUNCTION_NAME, __FILE__, __LINE__)
| Report an error in file operation with supplied fileName and lineNumber. More...
#define | warningIn(functionName) warningMessage((functionName), __FILE__, __LINE__)
| Report a warning with supplied function name. More...
#define | warningInFunction warningIn(FUNCTION_NAME)
| Report a warning. More...
#define | fatalExit reportAndExit()
| Fatal exit. More...

## Functions

int | fatalExitPhasicFlow (int errorCode=EXIT_FAILURE)
| Take actions to fatal exit phasicFlow. More...
pFlow::iOstream & | fatalErrorMessage (const char *fileName, int linNumber)
pFlow::iOstream & | fatalErrorInMessage (const char *fnName, const char *fileName, int linNumber)
pFlow::iOstream & | notImplementedErrorMessage (const char *fnName, const char *fileName, int lineNumber)
pFlow::iOstream & | ioErrorMessage (const pFlow::word &fileName, int fileLineNumber, const char *fnName, const char *fName, int lNumber)
pFlow::iOstream & | ioErrorMessage (const char *fileName, int fileLineNumber, const char *fnName, const char *fName, int lNumber)
pFlow::iOstream & | warningMessage (const char *fnName, const char *fileName, int linNumber)
pFlow::iOstream & | reportAndExit (int errorCode=EXIT_FAILURE)

## Macro Definition Documentation

## fatalError

#define fatalError fatalErrorMessage(__FILE__, __LINE__)

Report a fatal error and exit the applicaiton.

Definition at line 70 of file error.hpp.

## fatalErrorIn

#define fatalErrorIn | ( |  | functionName | ) | fatalErrorInMessage((functionName), __FILE__, __LINE__)

Report a fatal error and supplied function name and exit the application.

Definition at line 73 of file error.hpp.

## fatalErrorInFunction

#define fatalErrorInFunction fatalErrorIn(FUNCTION_NAME)

Report a fatal error and function name and exit the application.

Definition at line 77 of file error.hpp.

## Not_Implemented

#define Not_Implemented | ( |  | functionName | ) | notImplementedErrorMessage((functionName), __FILE__, __LINE__)

Report that a function is yet not implemented with supplied function name.

Definition at line 80 of file error.hpp.

## notImplementedFunction

#define notImplementedFunction Not_Implemented(FUNCTION_NAME)

Report that a function is yet not implemented.

Definition at line 84 of file error.hpp.

## ioErrorInFile

#define ioErrorInFile | ( |  | fileName,
|  |  | lineNumber
| ) |  | ioErrorMessage(fileName, lineNumber, FUNCTION_NAME, __FILE__, __LINE__)

Report an error in file operation with supplied fileName and lineNumber.

Definition at line 87 of file error.hpp.

## warningIn

#define warningIn | ( |  | functionName | ) | warningMessage((functionName), __FILE__, __LINE__)

Report a warning with supplied function name.

Definition at line 91 of file error.hpp.

## warningInFunction

#define warningInFunction warningIn(FUNCTION_NAME)

Report a warning.

Definition at line 95 of file error.hpp.

## fatalExit

#define fatalExit reportAndExit()

Fatal exit.

Definition at line 98 of file error.hpp.

## Function Documentation

## fatalExitPhasicFlow()

int fatalExitPhasicFlow | ( | int | errorCode = `EXIT_FAILURE` | ) |

Take actions to fatal exit phasicFlow.

Definition at line 119 of file error.cpp.

References processors::abort().

Referenced by reportAndExit().

Here is the call graph for this function:
Here is the caller graph for this function:

## fatalErrorMessage()

pFlow::iOstream& fatalErrorMessage | ( | const char * | fileName,
|  | int | linNumber
| ) |  |

Definition at line 35 of file error.cpp.

References errorStream, and Red_Text.

## fatalErrorInMessage()

pFlow::iOstream& fatalErrorInMessage | ( | const char * | fnName,
|  | const char * | fileName,
|  | int | linNumber
| ) |  |

Definition at line 44 of file error.cpp.

References errorStream, and Red_Text.

Referenced by pFlow::checkMPI().

Here is the caller graph for this function:

## notImplementedErrorMessage()

pFlow::iOstream& notImplementedErrorMessage | ( | const char * | fnName,
|  | const char * | fileName,
|  | int | lineNumber
| ) |  |

Definition at line 54 of file error.cpp.

References errorStream, Red_Text, and Yellow_Text.

## ioErrorMessage() [1/2]

pFlow::iOstream& ioErrorMessage | ( | const pFlow::word & | fileName,
|  | int | fileLineNumber,
|  | const char * | fnName,
|  | const char * | fName,
|  | int | lNumber
| ) |  |

Definition at line 87 of file error.cpp.

References ioErrorMessage().

Here is the call graph for this function:

## ioErrorMessage() [2/2]

pFlow::iOstream& ioErrorMessage | ( | const char * | fileName,
|  | int | fileLineNumber,
|  | const char * | fnName,
|  | const char * | fName,
|  | int | lNumber
| ) |  |

Definition at line 69 of file error.cpp.

References errorStream, and Red_Text.

Referenced by ioErrorMessage().

Here is the caller graph for this function:

## warningMessage()

pFlow::iOstream& warningMessage | ( | const char * | fnName,
|  | const char * | fileName,
|  | int | linNumber
| ) |  |

Definition at line 101 of file error.cpp.

References errorStream, and Yellow_Text.

## reportAndExit()

pFlow::iOstream& reportAndExit | ( | int | errorCode = `EXIT_FAILURE` | ) |

Definition at line 111 of file error.cpp.

References pFlow::endl(), errorStream, and fatalExitPhasicFlow().

Referenced by pFlow::checkMPI().

Here is the call graph for this function:
Here is the caller graph for this function: