Click here to Skip to main content
15,861,168 members
Articles / Desktop Programming / MFC

StL Data File Viewer

Rate me:
Please Sign up or sign in to vote.
4.87/5 (43 votes)
5 Mar 2003CPOL2 min read 506.1K   14.7K   60  
A simple StereoLithography data file viewer.
// GeomException.cpp: implementation of the CGeomException class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GeomException.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Product Manager Mahindra & Mahindra
India India
Sharjith is a Mechanical Engineer with strong passion for Automobiles, Aircrafts and Software development.

Comments and Discussions