24 : ctkException(status->GetMessage()), status(status)
26 if (status->GetException())
28 this->setCause(*status->GetException());
38 return "Core exception";
56 QDebug CoreException::printStackTrace(QDebug dbg)
const
58 return PrintChildren(status.GetPointer(), ctkException::printStackTrace(dbg));
61 QDebug CoreException::PrintChildren(IStatus *status, QDebug dbg)
const
63 QList<IStatus::Pointer> children = status->GetChildren();
64 for (
int i = 0; i < children.size(); ++i)
66 dbg <<
"Contains: " << qPrintable(children[i]->GetMessage()) <<
'\n';
67 const ctkException* exc = children[i]->GetException();
70 dbg << exc->printStackTrace();
72 PrintChildren(children[i].GetPointer(), dbg);
CoreException(const SmartPointer< IStatus > &status)
Implements transparent reference counting.
const char * name() const override
SmartPointer< IStatus > GetStatus() const
void rethrow() const override
CoreException * clone() const override