FreeFOAM The Cross-Platform CFD Toolkit
IOerror Class Reference

Report an I/O error. More...

#include <src/OpenFOAM/db/error/error.H>


Detailed Description

Report an I/O error.

Definition at line 194 of file error.H.

+ Inheritance diagram for IOerror:
+ Collaboration diagram for IOerror:

List of all members.

Public Member Functions

 IOerror (const string &title)
 Construct from title string.
 IOerror (const dictionary &errDict)
 Construct from dictionary.
virtual ~IOerror () throw ()
const stringioFileName () const
label ioStartLineNumber () const
label ioEndLineNumber () const
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const string &ioFileName, const label ioStartLineNumber=-1, const label ioEndLineNumber=-1)
 Convert to Ostream.
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const IOstream &)
 Convert to Ostream.
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const dictionary &)
 Convert to Ostream.
 operator dictionary () const
 Create and return a dictionary.
void exit (const int errNo=1)
 Exit : can be called for any error to exit program.
void abort ()
 Abort : used to stop code for fatal errors.
- Public Member Functions inherited from error
 error (const string &title)
 Construct from title string.
 error (const dictionary &errDict)
 Construct from dictionary.
 error (const error &err)
 Construct as copy.
virtual ~error () throw ()
string message () const
const stringfunctionName () const
const stringsourceFileName () const
label sourceFileLineNumber () const
void throwExceptions ()
void dontThrowExceptions ()
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber=0)
 Convert to Ostream.
OSstreamoperator() (const string &functionName, const char *sourceFileName, const int sourceFileLineNumber=0)
 operator OSstream & ()
 Convert to Ostream.
OSstreamoperator() ()
 Explicitly convert to Ostream for << operations.
- Public Member Functions inherited from messageStream
 messageStream (const string &title, errorSeverity sev, const int maxErrors=0)
 Construct from components.
 messageStream (const dictionary &dict)
 Construct from dictionary.
const stringtitle () const
 Return the title of this error type.
int maxErrors () const
 Return the maximum number of errors before program termination.
int & maxErrors ()
 Return non-const access to the maximum number of errors before.

Friends

Ostreamoperator<< (Ostream &, const IOerror &)

Additional Inherited Members

- Static Public Member Functions inherited from error
static void printStack (Ostream &os)
 Helper function to print a stack.
- Protected Attributes inherited from error
string functionName_
string sourceFileName_
label sourceFileLineNumber_
bool abort_
bool throwExceptions_
OStringStreammessageStreamPtr_
- Protected Attributes inherited from messageStream
string title_
errorSeverity severity_
int maxErrors_
int errorCount_

Constructor & Destructor Documentation

IOerror ( const string title)

Construct from title string.

Definition at line 35 of file IOerror.C.

IOerror ( const dictionary errDict)

Construct from dictionary.

Definition at line 44 of file IOerror.C.

~IOerror ( ) throw ()
virtual

Definition at line 53 of file IOerror.C.


Member Function Documentation

const string& ioFileName ( ) const
inline

Definition at line 223 of file error.H.

Referenced by Foam::operator<<().

label ioStartLineNumber ( ) const
inline

Definition at line 228 of file error.H.

Referenced by Foam::operator<<().

label ioEndLineNumber ( ) const
inline

Definition at line 233 of file error.H.

Referenced by Foam::operator<<().

Foam::OSstream & operator() ( const char *  functionName,
const char *  sourceFileName,
const int  sourceFileLineNumber,
const string ioFileName,
const label  ioStartLineNumber = -1,
const label  ioEndLineNumber = -1 
)

Convert to Ostream.

Prints basic message and then returns Ostream for further info.

Reimplemented from messageStream.

Definition at line 58 of file IOerror.C.

References error::operator()().

Foam::OSstream & operator() ( const char *  functionName,
const char *  sourceFileName,
const int  sourceFileLineNumber,
const IOstream ioStream 
)

Convert to Ostream.

Prints basic message and then returns Ostream for further info.

Reimplemented from messageStream.

Definition at line 77 of file IOerror.C.

Foam::OSstream & operator() ( const char *  functionName,
const char *  sourceFileName,
const int  sourceFileLineNumber,
const dictionary dict 
)

Convert to Ostream.

Prints basic message and then returns Ostream for further info.

Reimplemented from messageStream.

Definition at line 97 of file IOerror.C.

operator dictionary ( ) const

Create and return a dictionary.

Reimplemented from error.

void exit ( const int  errNo = 1)

Exit : can be called for any error to exit program.

Reimplemented from error.

Definition at line 131 of file IOerror.C.

References Foam::abort(), dictionary::add(), JobInfo::constructed, Foam::endl(), JobInfo::exit(), Foam::exit(), Pstream::exit(), Foam::jobInfo, Pstream::parRun(), and Foam::Perr.

Referenced by Foam::exit(), Istream::operator()(), and IFstream::operator()().

void abort ( )

Abort : used to stop code for fatal errors.

Reimplemented from error.

Definition at line 172 of file IOerror.C.

References JobInfo::abort(), Foam::abort(), Pstream::abort(), dictionary::add(), JobInfo::constructed, Foam::endl(), Foam::jobInfo, Pstream::parRun(), and Foam::Perr.

Referenced by Foam::abort().


Friends And Related Function Documentation

Ostream& operator<< ( Ostream ,
const IOerror  
)
friend

The documentation for this class was generated from the following files: