EDoc::PropogatingException Class Reference

#include <include/EDoc/PropogatingException.h>

Inheritance diagram for EDoc::PropogatingException:

EDoc::DictionarySpecific

Detailed Description

Represents an exception that propogates out a function.

Note this may also represent an exception that originates from the same function (Originating exception) in which case the function in its "from" field is the function that also holds the reference to this propogating exception instance.

Definition at line 42 of file PropogatingException.h.

Public Member Functions

 PropogatingException (Dictionary &dict_in, Exception *exception_in, FunctionLoc &from_in)
 Constructs a new propogating exception object belonging to the given Dictionary initialising with given values.
 PropogatingException (Dictionary *dict_in=NULL)
 See CodeBlock::CodeBlock(Dictionary* dict_in=NULL).
 PropogatingException (const PropogatingException &right)
 See CodeBlock::CodeBlock(const CodeBlock& right).
 PropogatingException (const PropogatingException &right, Dictionary &dict_in)
 See CodeBlock::CodeBlock(const CodeBlock& right, Dictionary& dict_in).
PropogatingExceptionoperator= (const PropogatingException &right)
 See CodeBlock::operator=().
virtual size_t ReplaceReferences (PStack &stack, void *remove, void *replace)
 See DictionarySpecific::ReplaceReferences().
virtual std::ostream & Print (std::ostream &out, std::string prefix="") const
 See DictionarySpecific::Print().
virtual void Validate (PStack &stack, const Dictionary &dict_in) const
 See DictionarySpecific::Validate().
bool operator== (const PropogatingException &right) const
 Equivilance operator (Works across dictionaries).
bool IsVisible () const
 Returns true if this exception is visible.
std::string ToString (std::string prefix="") const
 Returns a string representing the current object in a user readable manner.

Data Fields

Exceptionexception
 A reference to the exception object that this propogating exception originates from.
FunctionLoc func
 Has two usages.
std::list< Exception * > rethrows
 A list of Exception objects that indicate where in this functions implementation that the current exception may have been "re-thrown".
bool possible
 True if this exception is propogated from a "possible" function call and is not a definite propogation.
bool visible
 True if this exception is visible to the user or false if this exception will never be displayed to the user.
bool orig_subst

Protected Attributes

Dictionarydict
 A reference to the dictionary this object belongs to.


Constructor & Destructor Documentation

EDoc::PropogatingException::PropogatingException ( EDoc::Dictionary dict_in,
EDoc::Exception exception_in,
EDoc::FunctionLoc from_in 
)

Constructs a new propogating exception object belonging to the given Dictionary initialising with given values.

Note:
EDoc++ data included.

Definition at line 34 of file PropogatingException.cpp.

EDoc::PropogatingException::PropogatingException ( EDoc::Dictionary dict_in = NULL  ) 

See CodeBlock::CodeBlock(Dictionary* dict_in=NULL).

Note:
EDoc++ data included.

Definition at line 47 of file PropogatingException.cpp.

EDoc::PropogatingException::PropogatingException ( const PropogatingException right  ) 

See CodeBlock::CodeBlock(const CodeBlock& right).

Note:
EDoc++ data included.

Definition at line 57 of file PropogatingException.cpp.

References EDoc::DictionarySpecific::dict, EDOC_ASSERT, and exception.

EDoc::PropogatingException::PropogatingException ( const PropogatingException right,
Dictionary dict_in 
)

See CodeBlock::CodeBlock(const CodeBlock& right, Dictionary& dict_in).


Member Function Documentation

EDoc::PropogatingException::operator= ( const PropogatingException right  ) 

See CodeBlock::operator=().

Note:
EDoc++ data included.

Definition at line 72 of file PropogatingException.cpp.

References EDoc::DictionarySpecific::dict, EDOC_ASSERT, exception, func, orig_subst, possible, rethrows, and visible.

EDoc::PropogatingException::ReplaceReferences ( EDoc::PStack stack,
void *  remove,
void *  replace 
) [virtual]

See DictionarySpecific::ReplaceReferences().

Note:
EDoc++ data included.

Implements EDoc::DictionarySpecific.

Definition at line 136 of file PropogatingException.cpp.

References EDOC_FOREACH_CONST, exception, func, EDoc::PStack::Push(), EDoc::FunctionLoc::ReplaceReferences(), EDoc::Exception::ReplaceReferences(), and rethrows.

EDoc::PropogatingException::Print ( std::ostream &  out,
std::string  prefix = "" 
) const [virtual]

See DictionarySpecific::Print().

Note:
EDoc++ data included.

Implements EDoc::DictionarySpecific.

Definition at line 156 of file PropogatingException.cpp.

References EDOC_FOREACH_CONST, exception, func, EDoc::StringIdentifiedObject::GetKeyName(), EDoc::INDENT_STR, EDoc::FunctionLoc::Print(), EDoc::Exception::Print(), rethrows, EDoc::Exception::type, and EDoc::TypeLoc::value.

EDoc::PropogatingException::Validate ( EDoc::PStack stack,
const Dictionary dict_in 
) const [virtual]

See DictionarySpecific::Validate().

Note:
EDoc++ data included.

Implements EDoc::DictionarySpecific.

Definition at line 92 of file PropogatingException.cpp.

References EDoc::DictionarySpecific::dict, EDOC_ASSERT, EDOC_FOREACH_CONST, exception, func, EDoc::Type::GetDeclaredName(), orig_subst, possible, EDoc::FunctionLoc::possible, rethrows, EDoc::Exception::type, EDoc::FunctionLoc::Validate(), EDoc::Exception::Validate(), and EDoc::TypeLoc::value.

EDoc::PropogatingException::operator== ( const PropogatingException right  )  const

Equivilance operator (Works across dictionaries).

NOTE: Does not look at the rethrow list for equality.

Definition at line 127 of file PropogatingException.cpp.

References exception, and func.

EDoc::PropogatingException::IsVisible (  )  const

Returns true if this exception is visible.

This will only return true if all of the following are visible:

Definition at line 180 of file PropogatingException.cpp.

References exception, EDoc::Exception::type, EDoc::TypeLoc::value, EDoc::Type::visible, EDoc::Exception::visible, and visible.

EDoc::DictionarySpecific::ToString ( std::string  prefix = ""  )  const [inherited]

Returns a string representing the current object in a user readable manner.

This will return as a string exactly what Print() would display. This is primarily here for use from within python and for debugging.

Definition at line 34 of file DictionarySpecific.cpp.

References EDoc::DictionarySpecific::Print().

Referenced by EDoc::Dictionary::Read().


Field Documentation

Exception* EDoc::PropogatingException::exception

A reference to the exception object that this propogating exception originates from.

Definition at line 118 of file PropogatingException.h.

Referenced by EDoc::AddPException(), EDoc::AddRethrow(), EDoc::Dictionary::HandleCircularCallgraph(), IsVisible(), operator=(), operator==(), Print(), PropogatingException(), ReplaceReferences(), and Validate().

FunctionLoc EDoc::PropogatingException::func

Has two usages.

Usages include:

  1. Exception propogates from another function. In this case this contains the reference to the function from which this exception comes and ALSO the source code Location where the call to that function is made.
  2. Exception originates from THIS function. This is when a function directly throws an exception with the C++ throws statement. In this case the function reference is NULL and the Location is the location in source where the exception is Dictionary::UNKNOWN_LOCATION

Definition at line 135 of file PropogatingException.h.

Referenced by operator=(), operator==(), Print(), ReplaceReferences(), and Validate().

std::list<Exception*> EDoc::PropogatingException::rethrows

A list of Exception objects that indicate where in this functions implementation that the current exception may have been "re-thrown".

List of the throw ... statements that have been used to rethrow this exception.

Definition at line 145 of file PropogatingException.h.

Referenced by EDoc::AddRethrow(), operator=(), Print(), ReplaceReferences(), and Validate().

bool EDoc::PropogatingException::possible

True if this exception is propogated from a "possible" function call and is not a definite propogation.

Definition at line 153 of file PropogatingException.h.

Referenced by EDoc::AddPException(), EDoc::AddRethrow(), EDoc::Dictionary::HandleCircularCallgraph(), operator=(), and Validate().

bool EDoc::PropogatingException::visible

True if this exception is visible to the user or false if this exception will never be displayed to the user.

This is used for suppressions.

Definition at line 161 of file PropogatingException.h.

Referenced by EDoc::AddPException(), EDoc::AddRethrow(), EDoc::Dictionary::HandleCircularCallgraph(), IsVisible(), and operator=().

bool EDoc::PropogatingException::orig_subst

Definition at line 170 of file PropogatingException.h.

Referenced by operator=(), and Validate().

Dictionary& EDoc::DictionarySpecific::dict [protected, inherited]

A reference to the dictionary this object belongs to.

Definition at line 150 of file DictionarySpecific.h.

Referenced by EDoc::ManagedObject::CAlwaysGet(), EDoc::CatchBlock::CatchBlock(), EDoc::Exception::Exception(), EDoc::Function::ExpandCallGraph(), EDoc::CodeBlock::ExpandCallGraph(), EDoc::FunctionLoc::FunctionLoc(), EDoc::FunctionTypeLoc::FunctionTypeLoc(), EDoc::Function::GetSubstException(), EDoc::Location::Location(), EDoc::ManagedObject::ManagedObject(), EDoc::Type::Merge(), EDoc::Location::Merge(), EDoc::Function::Merge(), EDoc::SpecificManagedObject< EDoc::Type >::New(), EDoc::TypeLoc::operator=(), EDoc::Type::operator=(), EDoc::TryBlock::operator=(), operator=(), EDoc::Location::operator=(), EDoc::FunctionTypeLoc::operator=(), EDoc::FunctionType::operator=(), EDoc::FunctionLoc::operator=(), EDoc::Function::operator=(), EDoc::Exception::operator=(), EDoc::CodeBlock::operator=(), PropogatingException(), EDoc::TryBlock::Read(), EDoc::Function::Read(), EDoc::CodeBlock::Read(), EDoc::TryBlock::TryBlock(), EDoc::TypeLoc::TypeLoc(), EDoc::TypeLoc::Validate(), EDoc::Type::Validate(), EDoc::TryBlock::Validate(), Validate(), EDoc::ManagedObject::Validate(), EDoc::Location::Validate(), EDoc::FunctionTypeLoc::Validate(), EDoc::FunctionType::Validate(), EDoc::FunctionLoc::Validate(), EDoc::Function::Validate(), EDoc::File::Validate(), EDoc::Exception::Validate(), EDoc::CodeBlock::Validate(), EDoc::CatchBlock::Validate(), EDoc::Type::Write(), and EDoc::Function::Write().


The documentation for this class was generated from the following files:
Generated on Tue Jan 20 18:26:09 2009 for EDoc-0.2.1 by  doxygen 1.5.1