library of assembled shared sources

http://lass.cocamware.com

lass::python::PythonException Class Reference

#include <pyobject_plus.h>

Inheritance diagram for lass::python::PythonException:

Inheritance graph
[legend]
Collaboration diagram for lass::python::PythonException:

Collaboration graph
[legend]

Public Member Functions

 PythonException (const TPyObjPtr &type, const TPyObjPtr &value, const TPyObjPtr &traceback, const std::string &loc)
 ~PythonException () throw ()
const python::TPyObjPtrtype () const
const python::TPyObjPtrvalue () const
const python::TPyObjPtrtraceback () const
virtual const char * what () const throw ()
 return message in STL style
const std::string & message () const
 return string with error message
const std::string & location () const
 return string with location info where exception is thrown
void throwSelf () const
std::auto_ptr
< RemoteExceptionBase > 
clone () const

Private Attributes

python::TPyObjPtr type_
python::TPyObjPtr value_
python::TPyObjPtr traceback_

Related Functions

(Note that these are not member functions.)

 LASS_THROW_EX(t_exception, s_message)

Detailed Description

Definition at line 555 of file pyobject_plus.h.


Constructor & Destructor Documentation

lass::python::PythonException::PythonException ( const TPyObjPtr type,
const TPyObjPtr value,
const TPyObjPtr traceback,
const std::string &  loc 
) [inline]

Definition at line 558 of file pyobject_plus.h.

lass::python::PythonException::~PythonException (  )  throw () [inline]

Definition at line 567 of file pyobject_plus.h.


Member Function Documentation

const python::TPyObjPtr& lass::python::PythonException::type (  )  const [inline]

Definition at line 568 of file pyobject_plus.h.

References type_.

Referenced by lass::python::impl::handlePythonException().

const python::TPyObjPtr& lass::python::PythonException::value (  )  const [inline]

Definition at line 569 of file pyobject_plus.h.

References value_.

Referenced by lass::python::impl::handlePythonException().

const python::TPyObjPtr& lass::python::PythonException::traceback (  )  const [inline]

Definition at line 570 of file pyobject_plus.h.

References traceback_.

Referenced by lass::python::impl::handlePythonException().

virtual const char* lass::util::Exception::what (  )  const throw () [inline, virtual, inherited]

return message in STL style

Definition at line 144 of file exception.h.

References lass::util::Exception::message_.

const std::string& lass::util::Exception::message (  )  const [inline, inherited]

const std::string& lass::util::Exception::location (  )  const [inline, inherited]

return string with location info where exception is thrown

Definition at line 158 of file exception.h.

References lass::util::Exception::location_.

Referenced by lass::python::impl::handleLassException().

void lass::util::experimental::RemoteExceptionBase::throwSelf (  )  const [inline, inherited]

std::auto_ptr<RemoteExceptionBase> lass::util::experimental::RemoteExceptionBase::clone (  )  const [inline, inherited]


Friends And Related Function Documentation

LASS_THROW_EX ( t_exception,
s_message   )  [related, inherited]

To throw an exception like util::Exception that accepts a message and a location string, you can supply those strings yourself, ore you can use this macro for your convenience.

This macro will fill in the location by itself so that you only have to worry about the message. And as an extra, the message is streamed, so you can use the regular operator<< to concatenate variables in the message.

  int foo = -5;
  if (foo < 0)
  {
      LASS_THROW_EX(util::Exception, "foo '" << foo << "' is less than zero");
  }

Definition at line 233 of file exception.h.


Field Documentation

Definition at line 573 of file pyobject_plus.h.

Referenced by lass::python::impl::StaticMemberHelperType::build(), and type().

Definition at line 574 of file pyobject_plus.h.

Referenced by value().

Definition at line 575 of file pyobject_plus.h.

Referenced by traceback().


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

Generated on Mon Nov 10 14:22:15 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo