codeexception.h

来自「这是一个能够自动生成文档的程序」· C头文件 代码 · 共 37 行

H
37
字号
#ifndef __CODEEXCEPTION_H__
#define __CODEEXCEPTION_H__
#pragma once

#include "Token.h"
#include "Page.h"

//用于处理语法错误的类
class CCodeException  
{
public:
	//构造函数
	CCodeException(CToken* ipToken, LPCTSTR iDesc=NULL);
	//析构函数
	virtual ~CCodeException();

public:
	//取得代码页的完整路径
	CString GetPathName() const {return mPathName;};
	//取得产生错误的说明
	CString GetDesc() const {return mDesc;};
	//取得出错的行号
	int     GetLine() const {return mLine;};
	//取得出错的列号
    int     GetColumn() const {return mColumn;};

private:
	CString mPathName;
	CString mDesc;
	int     mLine;
	int     mColumn;
};

#define TOKEN_EXCEPTION() {throw CCodeException(pToken);}
//#define TOKEN_EXCEPTION() {ASSERT(FALSE); throw CCodeException(pToken);}

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?