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

📄 error.h

📁 无线传感器网络操作系统源代码
💻 H
字号:
/*
** Error.h
** Uros Platise, (c) 1997, November
*/

#ifndef __Error
#define __Error
#include <stdio.h>

/* This error class is used to express standard C errors. */
class Error_C {};

/* Out of memory error class informs terminal or upload/download
   tools that it has gone out of valid memory - and that's all.
   Program should not terminate. */
class Error_MemoryRange {};

/* General internal error reporting class that normally force
   uisp to exit after proper destruction of all objects. */
class Error_Device {
public:
  Error_Device (const char *_errMsg, const char *_arg=NULL) : 
    errMsg(_errMsg), arg(_arg) { }
  void print () { 
    if (arg==NULL) { printf ("%s\n", errMsg); }
    else { printf ("%s: %s\n", errMsg, arg); }
  }
private:
  const char* errMsg;
  const char* arg;
};

#endif

⌨️ 快捷键说明

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