Ice 3.7 C++11 API Reference
Public Member Functions | List of all members
IceUtil::Exception Class Referenceabstract

Abstract base class for all Ice exceptions. More...

#include <Ice/Ice.h>

Inheritance diagram for IceUtil::Exception:
Inheritance graph
[legend]
Collaboration diagram for IceUtil::Exception:
Collaboration graph
[legend]

Public Member Functions

 Exception ()
 Constructs the exception. More...
 
 Exception (const char *file, int line)
 Constructs the exception. More...
 
std::unique_ptr< Exceptionice_clone () const
 Returns a shallow polymorphic copy of this exception. More...
 
const char * ice_file () const
 Returns the name of the file where this exception was constructed. More...
 
virtual std::string ice_id () const =0
 Returns the type ID of this exception. More...
 
int ice_line () const
 Returns the line number where this exception was constructed. More...
 
virtual void ice_print (std::ostream &os) const
 Outputs a description of this exception to a stream. More...
 
std::string ice_stackTrace () const
 Returns the stack trace at the point this exception was constructed. More...
 
virtual void ice_throw () const =0
 Throws this exception. More...
 
virtual const char * what () const throw ()
 Returns a description of this exception. More...
 
virtual ~Exception ()=0 throw ()
 

Detailed Description

Abstract base class for all Ice exceptions.

Use the Ice::Exception alias instead of IceUtil::Exception.

Constructor & Destructor Documentation

◆ Exception() [1/2]

IceUtil::Exception::Exception ( )

Constructs the exception.

Equivalent to Exception(nullptr, 0).

◆ Exception() [2/2]

IceUtil::Exception::Exception ( const char *  file,
int  line 
)

Constructs the exception.

Parameters
fileThe file where this exception is constructed.
lineThe line where this exception is constructed.

◆ ~Exception()

virtual IceUtil::Exception::~Exception ( )
throw (
)
pure virtual

Member Function Documentation

◆ ice_clone()

std::unique_ptr<Exception> IceUtil::Exception::ice_clone ( ) const

Returns a shallow polymorphic copy of this exception.

Returns
A unique_ptr to the new shallow copy.

◆ ice_file()

const char* IceUtil::Exception::ice_file ( ) const

Returns the name of the file where this exception was constructed.

Returns
The file name.

◆ ice_id()

virtual std::string IceUtil::Exception::ice_id ( ) const
pure virtual

◆ ice_line()

int IceUtil::Exception::ice_line ( ) const

Returns the line number where this exception was constructed.

Returns
The line number.

◆ ice_print()

virtual void IceUtil::Exception::ice_print ( std::ostream &  os) const
virtual

◆ ice_stackTrace()

std::string IceUtil::Exception::ice_stackTrace ( ) const

Returns the stack trace at the point this exception was constructed.

Returns
The stack trace as a string.

◆ ice_throw()

virtual void IceUtil::Exception::ice_throw ( ) const
pure virtual

Throws this exception.

Implemented in IceUtil::ExceptionHelper< E, B >.

◆ what()

virtual const char* IceUtil::Exception::what ( ) const
throw (
)
virtual

Returns a description of this exception.

Returns
The description.

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