#include "exceptionbase.h"

const char* ExceptionBase::type="ExceptionBase";

const char* ExceptionBase::getType() const
{
	return type;
}

string& ExceptionBase::stackTrace() const
{
	string& sTrace=*(new string());
	const ExceptionBase* parent=this;
	while(parent!=0)
	{
		sTrace.append(getType());
		sTrace.append(" : ");
		sTrace.append(getMessage());
		sTrace.append("\n");
		parent=parent->parentException;
	}
	return sTrace;
}
