ADTF  v2.14.3
cException Class Reference

Exception class. More...

Inheritance diagram for cException:

Public Member Functions

 cException ()
 Default Constructor. More...
 
 cException (tResult nResult)
 Creates an Exception with the initial given nResult. More...
 
 cException (tResult nResult, const tChar *strMessage)
 Creates an Exception with the initial given nResult and Error Message Context. More...
 
 cException (tResult nResult, const tChar *strMessage, const tChar *strSource, tInt nLine)
 Creates an Exception with the initial values given. More...
 
 cException (IException *pExceptionRef)
 Creates an Exception as Ref to a IException. More...
 
 cException (const cException &oException)
 Creates an Exception as copy of the given exception if the given exception references to another then the reference will be added. More...
 
virtual ~cException ()
 The Destructor. More...
 
tVoid CopyContent (IException *pException)
 Copies the real content of the given exception pointer. More...
 
IException ** operator& ()
 Returns a pointer to the internal exception pointer. More...
 
 operator IException * () const
 Cast to the exception interface. More...
 
IExceptionoperator= (IException *pExceptionRef)
 Sets the internal exception pointer. More...
 
IExceptionoperator= (const cException &oException)
 Copies an exception. More...
 
tResult GetResult ()
 Implements IException::GetResult. More...
 
const tCharGetSource ()
 Implements IException::GetSource. More...
 
tInt GetLine ()
 Implements IException::GetLine. More...
 
const tCharGetDescription ()
 Implements IException::GetDescription. More...
 
tResult GetInterface (const tChar *idInterface, void **ppvObject)
 Implements IObject::GetInterface.
 
tUInt Ref ()
 Implements IObject::Ref.
 
tUInt Unref ()
 Implements IObject::Unref.
 
tVoid Destroy ()
 Implements IObject::Destroy.
 

Protected Member Functions

tVoid Initialize ()
 Initializes the exception object.
 

Protected Attributes

tResult m_nResult
 the stored result code.
 
adtf_util::cString m_strMessage
 the exception message.
 
adtf_util::cString m_strSource
 the source file location where the exception was thrown.
 
tInt m_nLine
 the line number in the source file where the exception was thrown.
 
IExceptionm_pExceptionRef
 a reference to an external exception object.
 
cReferenceCounter m_oReferenceCounter
 this stores the reference count.
 

Detailed Description

Exception class.

The class cException implements IException and also provides a smart pointer for dynamically created exception objects by automatically calling Unref() at attached exception object references when executing the destructor.

Definition at line 28 of file exception.h.

Constructor & Destructor Documentation

Default Constructor.

This method is real-time safe.
See The ADTF Real-Time Extension.
cException ( tResult  nResult)

Creates an Exception with the initial given nResult.

Parameters
nResult[in] The Result Code.
This method is real-time safe.
See The ADTF Real-Time Extension.
cException ( tResult  nResult,
const tChar strMessage 
)

Creates an Exception with the initial given nResult and Error Message Context.

Parameters
nResult[in] The Result Code.
strMessage[in] The Error Message to add.
cException ( tResult  nResult,
const tChar strMessage,
const tChar strSource,
tInt  nLine 
)

Creates an Exception with the initial values given.

Parameters
nResult[in] The Result Code.
strMessage[in] The Error Message to add.
strSource[in] The Source filepath (should be added with FILE).
nLine[in] The Line Number of Exception appeared.
cException ( IException pExceptionRef)

Creates an Exception as Ref to a IException.

Parameters
pExceptionRef[in] The Reference Pointer to a IException.
cException ( const cException oException)

Creates an Exception as copy of the given exception if the given exception references to another then the reference will be added.

Parameters
oException[in] The cException to copy.
virtual ~cException ( )
virtual

The Destructor.

This method is real-time safe only when the following conditions are met:
The exception must not be set, i.e. no error is returned by the method that you passed the exception to. See The ADTF Real-Time Extension.

Member Function Documentation

tVoid CopyContent ( IException pException)

Copies the real content of the given exception pointer.

Parameters
pException[in] The IException to copy.
Returns
void
const tChar* GetDescription ( )
virtual

Implements IException::GetDescription.

Returns
Description of exception
This method is real-time safe.
See The ADTF Real-Time Extension.

Implements IException.

tInt GetLine ( )
virtual

Implements IException::GetLine.

Returns
Source code line number
This method is real-time safe.
See The ADTF Real-Time Extension.

Implements IException.

tResult GetResult ( )
virtual

Implements IException::GetResult.

Returns
Standard result code
This method is real-time safe.
See The ADTF Real-Time Extension.

Implements IException.

const tChar* GetSource ( )
virtual

Implements IException::GetSource.

Returns
Name of source code
This method is real-time safe.
See The ADTF Real-Time Extension.

Implements IException.

operator IException * ( ) const

Cast to the exception interface.

Returns
The exception pointer.
This method is real-time safe.
See The ADTF Real-Time Extension.
IException** operator& ( )

Returns a pointer to the internal exception pointer.

Returns
A pointer to the internal exception pointer.
This method is real-time safe.
See The ADTF Real-Time Extension.
IException* operator= ( IException pExceptionRef)

Sets the internal exception pointer.

Parameters
[in]pExceptionRefan exception pointer.
Returns
the internal exception pointer.
IException* operator= ( const cException oException)

Copies an exception.

Parameters
[in]oExceptionThe exception to copy.
Returns
the internal exception pointer.

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Fri Mar 22 2019 by doxygen 1.8.10)