📄 errortype.c
字号:
/*
Name: ErrorType.c
Copyright: Starting Line
Author:
Date: 12-11-08 01:58
Description: Error函数
*/
/*
TO
错误处理我来写,你要是愿意可以帮我写写,嘿嘿
*/
#include "includes.h"
extern Lstack * CalStack_;
extern Liner * CalLine_;
extern int ResFlag;
/*
Function Name: Error
Author:
Description: 所有错误或异常的处理例程
*/
void Error ( ERROR value )
{
switch ( value )
{
case E_GE :
{
printf ( "\tGrammar ERROR !\n" );
ResFlag = 1;
//free ( CalStack_ );
//free ( CalLine_ );
//将原有表达式清空
break;
}
case E_OVERFLOW :
{
//栈溢出处理
LstExpand ( CalStack_ );//扩展栈空间
}
case E_OUTLINE :
{
//初始表达式溢出处理
LinerExpand ( CalLine_ );//扩展线性表达式空间
}
case E_OVER_MEM :
{
printf ( "ERROR! Memery is NOT Enough!" );
getch ();
exit ( 0 );
//内存不足处理
}
case E_FAIL_COMSET :
{
printf ( "ERROR! FAIL to Load Command Set File!" );
getch ();
exit ( 0 );
//读取指令列表失败处理
}
case E_FAIL_APPSET :
{
printf ( "FAIL to Load Application Set File!" );
getch ();
exit ( 0 );
//读取配置文件错误处理
}
case E_END_HIS :
{
printf ( "\nEND of the History Record!\n" );
break;
//历史纪录到头或者到尾错误
}
case E_LOAD_FILE :
{
printf ( "ERROR File Path!\n");
//getch();
break;
}
case E_GE_FILE :
{
printf ( "Gramma ERROR in Files!\n" );
getch();
break;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -