Error_m.cpp #3

  • //
  • guest/
  • jacob_gladish/
  • PerforceDotNet/
  • p4dn/
  • Error_m.cpp
  • View
  • Commits
  • Open Download .zip Download (817 B)
#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();
 }

# Change User Description Committed
#3 7712 Jacob Gladish Removed license.
Need to ensure proper assignment first.
#2 7704 Jacob Gladish Updated license to freebsd
#1 3787 Jacob Gladish initial code submission