⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 error.cpp

📁 实现一个精简型单用户SQL引擎(DBMS)MiniSQL
💻 CPP
字号:
//:error.cpp
#include "error.h"

char* ErrorMessage[]=
{
  "Error 1000: (malloc)there is insufficient memory available.",
  "Error 1001: Cannot access the address of file condition.",
  "Error 1002: (write)the file handle is invalid or the file is not opened for writing or there is not enough space left on the device for the operation.",
  "Error 1003: illegal page number (less than zero).",
  "Error 1004: cannot access the page far away from the end of the file",
  "Error 1005: (lseek)the file handle is invalid or the value for origin is invalid or the position the position specified by offset is before the beginning of the file.",
  "Error 1006: (open)cannot create file",
  
  "Error 1007: Primary Key demanded has not existed yet!",
  "Error 1008: Column demanded has not existed yet!",
  "Error 1009: Unknown relation operator!",
  "Error 1010: Unknown type!",
  "Error 1011: Not a select based on primary key!",
  "Error 1012: Type mismatch!",
  "Error 1013: Length Invalid for type char!",
  "Error 1014: Invalid Value!",
  "Error 1015: Value of Primary Key can not be null!",
  "Error 1016: Inadequate value for every column!",
  "Error 1017: No value for some not null column!",
  "Error 1018: Update denied on primary key!",
  "Error 1019: Information Inadequate for selection(Every attribute should be included)!",
  "Error 1020: Result is null!",
  
  "Error 1021: Key Attribute type is wrong,used for debug!",
  "Error 1022: Search path error in b+ tree!",
  "Error 1023: The primary key hasn't existed,used for debug!",
  "Error 1024: The primary key has existed,used for debug!",
  "Error 1025: The primary key has existed!",
  "Error 1026: The primary Key hasn't existed!",
  "Error 1027: No Reocrd!",
  "Error 1028: The tree isn't enough depth",

  "Error 1029: The required type is not supported yet for the time being.",
  "Error 1030: Fatal error with data missing,maybe it is a media failure.",

  "Error 1031: Cannot read data from file,maybe it is a media failure.",
  "Error 1032: Overloading of (== const int) only serve ZERO",
  "Error 1033: Too few memory pages,mustn't be less than 3.",
  "Error 1034: Primary Key is too long!"
};

void DispatchError(int errorcode)
{
    std::cout<<"\n"<<ErrorMessage[errorcode-1000]<<"\n";
}

⌨️ 快捷键说明

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