Public Member Functions | Static Public Member Functions | List of all members
IOerror Class Reference
Inheritance diagram for IOerror:
Inheritance graph
[legend]
Collaboration diagram for IOerror:
Collaboration graph
[legend]

Public Member Functions

 IOerror (const string &title)
 
 IOerror (const dictionary &errDict)
 
virtual ~IOerror () noexcept
 
const stringioFileName () const noexcept
 
label ioStartLineNumber () const noexcept
 
label ioEndLineNumber () const noexcept
 
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const string &ioFileName, const label ioStartLineNumber=-1, const label ioEndLineNumber=-1)
 
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const IOstream &ioStream)
 
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const dictionary &dict)
 
OSstreamoperator() (const std::string &where, const IOstream &ioStream)
 
OSstreamoperator() (const std::string &where, const dictionary &dict)
 
 operator dictionary () const
 
void exit (const int errNo=1)
 
void abort ()
 
virtual void write (Ostream &os, const bool withTitle=true) const
 
- Public Member Functions inherited from error
 error (const string &title)
 
 error (const dictionary &errDict)
 
 error (const error &err)
 
virtual ~error () noexcept
 
string message () const
 
void clear () const
 
const stringfunctionName () const noexcept
 
const stringsourceFileName () const noexcept
 
label sourceFileLineNumber () const noexcept
 
bool throwing () const noexcept
 
bool throwing (const bool on) noexcept
 
OSstreamstream ()
 
 operator OSstream & ()
 
OSstreamoperator() ()
 
OSstreamoperator() (const string &functionName)
 
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber=0)
 
OSstreamoperator() (const string &functionName, const char *sourceFileName, const int sourceFileLineNumber=0)
 
 operator dictionary () const
 
void exit (const int errNo=1)
 
void abort ()
 
bool throwExceptions (const bool on=true) noexcept
 
bool dontThrowExceptions () noexcept
 
- Public Member Functions inherited from messageStream
 messageStream (const string &title, const errorSeverity severity, const int maxErrors=0)
 
 messageStream (const dictionary &dict)
 
const stringtitle () const noexcept
 
int maxErrors () const noexcept
 
int maxErrors (int nErrors) noexcept
 
OSstreamstream (OSstream *alternative=nullptr)
 
OSstreammasterStream (const label communicator)
 
std::ostream & stdStream ()
 
 operator OSstream & ()
 
OSstreamoperator() ()
 
OSstreamoperator() (const string &functionName)
 
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber=0)
 
OSstreamoperator() (const string &functionName, const char *sourceFileName, const int sourceFileLineNumber=0)
 
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const string &ioFileName, const label ioStartLineNumber=-1, const label ioEndLineNumber=-1)
 
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const IOstream &)
 
OSstreamoperator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const dictionary &)
 

Static Public Member Functions

static void SafeFatalIOError (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const IOstream &ioStream, const string &msg)
 
- Static Public Member Functions inherited from error
static bool master (const label communicator=-1)
 
static bool warnAboutAge (const int version) noexcept
 
static bool warnAboutAge (const char *what, const int version)
 
static void safePrintStack (std::ostream &os)
 
static void printStack (Ostream &os)
 
static bool useAbort ()
 

Additional Inherited Members

- Public Types inherited from messageStream
enum  errorSeverity {
  INFO = 1, INFO_STDERR, WARNING, SERIOUS,
  FATAL
}
 
- Static Public Attributes inherited from messageStream
static int level
 
static int redirect
 
- Protected Member Functions inherited from error
void simpleExit (const int errNo, const bool isAbort)
 
- Protected Attributes inherited from error
string functionName_
 
string sourceFileName_
 
label sourceFileLineNumber_
 
bool throwing_
 
std::unique_ptr< OStringStreammessageStreamPtr_
 
- Protected Attributes inherited from messageStream
string title_
 
errorSeverity severity_
 
int maxErrors_
 
int errorCount_
 

Detailed Description

Definition at line 277 of file error.H.

Constructor & Destructor Documentation

◆ IOerror() [1/2]

IOerror ( const string title)
explicit

Definition at line 31 of file IOerror.C.

◆ IOerror() [2/2]

IOerror ( const dictionary errDict)
explicit

Definition at line 40 of file IOerror.C.

◆ ~IOerror()

~IOerror ( )
virtualnoexcept

Definition at line 51 of file IOerror.C.

Member Function Documentation

◆ ioFileName()

const string& ioFileName ( ) const
inlinenoexcept

Definition at line 312 of file error.H.

◆ ioStartLineNumber()

label ioStartLineNumber ( ) const
inlinenoexcept

Definition at line 318 of file error.H.

◆ ioEndLineNumber()

label ioEndLineNumber ( ) const
inlinenoexcept

Definition at line 324 of file error.H.

◆ operator()() [1/5]

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

Definition at line 58 of file IOerror.C.

References os().

Here is the call graph for this function:

◆ operator()() [2/5]

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

Definition at line 83 of file IOerror.C.

◆ operator()() [3/5]

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

Definition at line 103 of file IOerror.C.

References dict, dictionary::endLineNumber(), dictionary::relativeName(), and dictionary::startLineNumber().

Here is the call graph for this function:

◆ operator()() [4/5]

Foam::OSstream & operator() ( const std::string &  where,
const IOstream ioStream 
)

Definition at line 123 of file IOerror.C.

◆ operator()() [5/5]

Foam::OSstream & operator() ( const std::string &  where,
const dictionary dict 
)

Definition at line 141 of file IOerror.C.

References dict, dictionary::endLineNumber(), dictionary::relativeName(), and dictionary::startLineNumber().

Here is the call graph for this function:

◆ SafeFatalIOError()

void SafeFatalIOError ( const char *  functionName,
const char *  sourceFileName,
const int  sourceFileLineNumber,
const IOstream ioStream,
const string msg 
)
static

Definition at line 159 of file IOerror.C.

References JobInfo::constructed, Foam::endl(), Foam::exit(), Foam::FatalIOError, IOstream::lineNumber(), Foam::nl, and IOstream::relativeName().

Here is the call graph for this function:

◆ operator dictionary()

operator dictionary ( ) const

◆ exit()

void exit ( const int  errNo = 1)

Definition at line 236 of file IOerror.C.

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

Here is the caller graph for this function:

◆ abort()

void abort ( )

Definition at line 242 of file IOerror.C.

Referenced by Foam::abort().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os,
const bool  withTitle = true 
) const
virtual

Reimplemented from error.

Definition at line 248 of file IOerror.C.

References Foam::foamVersion::api, IOstream::bad(), messageStream::level, Foam::nl, os(), Foam::foamVersion::patch, and Foam::foamVersion::patched().

Referenced by Foam::operator<<().

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

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