20 : ctkException(status->GetMessage()), status(status)
22 if (status->GetException())
24 this->setCause(*status->GetException());
34 return "Core exception";
52 QDebug CoreException::printStackTrace(QDebug dbg)
const 54 return PrintChildren(status.GetPointer(), ctkException::printStackTrace(dbg));
57 QDebug CoreException::PrintChildren(
IStatus *status, QDebug dbg)
const 59 QList<IStatus::Pointer> children = status->
GetChildren();
60 for (
int i = 0; i < children.size(); ++i)
62 dbg <<
"Contains: " << qPrintable(children[i]->GetMessage()) <<
'\n';
63 const ctkException* exc = children[i]->GetException();
66 dbg << exc->printStackTrace();
68 PrintChildren(children[i].GetPointer(), dbg);
CoreException(const SmartPointer< IStatus > &status)
Implements transparent reference counting.
const char * name() const override
SmartPointer< IStatus > GetStatus() const
~CoreException() override
void rethrow() const override
virtual QList< IStatus::Pointer > GetChildren() const =0
CoreException * clone() const override