#include "StdAfx.h"
#include "Error_m.h"
#include "stdhdrs.h"
#include <stdlib.h>
p4dn::Error::Error( void )
{
_err = new ::Error();
_requiresFree = true;
}
p4dn::Error::~Error( void )
{
if (_requiresFree) {
delete _err;
}
}
void p4dn::Error::Clear()
{
_err->Clear();
}
bool p4dn::Error::Test()
{
return _err->GetSeverity() == E_INFO;
}
bool p4dn::Error::IsInfo()
{
return _err->GetSeverity() == E_INFO;
}
bool p4dn::Error::IsWarning()
{
return _err->GetSeverity() == E_WARN;
}
bool p4dn::Error::IsFatal()
{
return _err->GetSeverity() == E_FATAL;
}
System::String* p4dn::Error::Fmt()
{
::StrBuf buf;
_err->Fmt( &buf );
System::String* temp = buf.Text();
return temp->Trim();
}