|
// GeomException.cpp: implementation of the CGeomException class.
//
//////////////////////////////////////////////////////////////////////
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include "stdafx.h"
#include "GeomException.h"
#include "MMath.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CGeomException::CGeomException()
{
}
CGeomException::CGeomException(ErrorType type)
{
msg = new char[50];
switch (type)
{
case DivideByZero:
msg = "\nDivide By Zero Raised!\n";
break;
case ConstructionFailure:
msg = "\nConstruction Failure Raised!\n";
break;
case MaxDegree:
msg = "\nDegree Greater Than Maximum Degree Allowed!\n";
break;
default:
break;
}
}
CGeomException::~CGeomException()
{
delete [] msg;
}
char* CGeomException::ErrorMessage() const
{
return msg;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Sharjith is a Mechanical Engineer with strong passion for Automobiles, Aircrafts and Software development.