Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// SError.h: interface for the SError class.
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//////////////////////////////////////////////////////////////////////
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#if !defined(AFX_SERROR_H__25953AF0_0B0B_11D6_B96F_0040F674BE6A__INCLUDED_)
Toshihiro Shimizu 890ddd
#define AFX_SERROR_H__25953AF0_0B0B_11D6_B96F_0040F674BE6A__INCLUDED_
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#if _MSC_VER > 1000
Toshihiro Shimizu 890ddd
#pragma once
Toshihiro Shimizu 890ddd
#endif // _MSC_VER > 1000
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <string></string>
Toshihiro Shimizu 890ddd
#include <vector></vector>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "SDef.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
using namespace std;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SError
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	string m_msg;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SError() : m_msg(""){};
Toshihiro Shimizu 890ddd
	SError(char *s) : m_msg(s){};
Toshihiro Shimizu 890ddd
	virtual ~SError(){};
Toshihiro Shimizu 890ddd
	virtual void debug_print() const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		/*if ( !m_msg.empty() )
Toshihiro Shimizu 890ddd
			smsg_error("Error %s!\n",m_msg.c_str()); 
Toshihiro Shimizu 890ddd
		else
Toshihiro Shimizu 890ddd
			smsg_error("\n"); */
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SMemAllocError : public SError
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SMemAllocError() : SError(""){};
Toshihiro Shimizu 890ddd
	SMemAllocError(char *s) : SError(s){};
Toshihiro Shimizu 890ddd
	virtual ~SMemAllocError(){};
Toshihiro Shimizu 890ddd
	void debug_print() const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		/*	if ( !m_msg.empty() )
Toshihiro Shimizu 890ddd
			smsg_error("Error in Memory Allocation %s!\n",m_msg.c_str()); 
Toshihiro Shimizu 890ddd
		else
Toshihiro Shimizu 890ddd
			smsg_error("Error in Memory Allocation\n"); */
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SWriteRasterError : public SError
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SWriteRasterError() : SError(""){};
Toshihiro Shimizu 890ddd
	SWriteRasterError(char *s) : SError(s){};
Toshihiro Shimizu 890ddd
	virtual ~SWriteRasterError(){};
Toshihiro Shimizu 890ddd
	void debug_print() const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		/*if ( !m_msg.empty() )
Toshihiro Shimizu 890ddd
			smsg_error("Error in Writing Raster %s!\n",m_msg.c_str()); 
Toshihiro Shimizu 890ddd
		else
Toshihiro Shimizu 890ddd
			smsg_error("Error in Writing Raster\n"); */
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SBlurMatrixError : public SError
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SBlurMatrixError() : SError(""){};
Toshihiro Shimizu 890ddd
	SBlurMatrixError(char *s) : SError(s){};
Toshihiro Shimizu 890ddd
	virtual ~SBlurMatrixError(){};
Toshihiro Shimizu 890ddd
	void debug_print() const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		/*	if ( !m_msg.empty() ) {
Toshihiro Shimizu 890ddd
			smsg_error("Error in Generating BlurMatrix %s!\n",m_msg.c_str()); 
Toshihiro Shimizu 890ddd
		} else
Toshihiro Shimizu 890ddd
			smsg_error("Error in Generating BlurMatrix!\n"); */
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SFileReadError : public SError
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SFileReadError() : SError(""){};
Toshihiro Shimizu 890ddd
	SFileReadError(char *s) : SError(s){};
Toshihiro Shimizu 890ddd
	virtual ~SFileReadError(){};
Toshihiro Shimizu 890ddd
	void debug_print() const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		/*if ( !m_msg.empty() ) {
Toshihiro Shimizu 890ddd
			smsg_error("Error in Reading File %s!\n",m_msg.c_str()); 
Toshihiro Shimizu 890ddd
		} else
Toshihiro Shimizu 890ddd
			smsg_error("Error in Reading File!\n"); */
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif // !defined(AFX_SERROR_H__25953AF0_0B0B_11D6_B96F_0040F674BE6A__INCLUDED_)