00001 /* 00002 This product contains certain software code or other information 00003 ("AT&T Software") proprietary to AT&T Corp. ("AT&T"). The AT&T 00004 Software is provided to you "AS IS". YOU ASSUME TOTAL RESPONSIBILITY 00005 AND RISK FOR USE OF THE AT&T SOFTWARE. AT&T DOES NOT MAKE, AND 00006 EXPRESSLY DISCLAIMS, ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND 00007 WHATSOEVER, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 00008 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WARRANTIES OF 00009 TITLE OR NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS, ANY 00010 WARRANTIES ARISING BY USAGE OF TRADE, COURSE OF DEALING OR COURSE OF 00011 PERFORMANCE, OR ANY WARRANTY THAT THE AT&T SOFTWARE IS "ERROR FREE" OR 00012 WILL MEET YOUR REQUIREMENTS. 00013 00014 Unless you accept a license to use the AT&T Software, you shall not 00015 reverse compile, disassemble or otherwise reverse engineer this 00016 product to ascertain the source code for any AT&T Software. 00017 00018 (c) AT&T Corp. All rights reserved. AT&T is a registered trademark of AT&T Corp. 00019 00020 *********************************************************************** 00021 00022 History: 00023 00024 24/11/99 - initial release by Hartmut Liefke, liefke@seas.upenn.edu 00025 Dan Suciu, suciu@research.att.com 00026 */ 00027 00028 //************************************************************************** 00029 //************************************************************************** 00030 00031 // This module implements the error handling. An error message 00032 // is one line and several error messages can be stored together 00033 // Then, an exception can be raised and all error messages 00034 // are printed through 'PrintErrorMsg()'. 00035 00036 #ifndef ERROR_HPP 00037 #define ERROR_HPP 00038 00039 void Error(char *str,int len); // Starts a new error msg 00040 void Error(char *str); // Starts a new error msg (with '\0' at the end) 00041 00042 void ErrorCont(char *str,int len); // Continues the current error msg 00043 void ErrorCont(char *str); // Continues the current error msg 00044 00045 void PrintErrorMsg(); // Prints the current error messsages 00046 00047 void Exit(); // Exits the program 00048 00049 inline void ExitNoMem() 00050 // Exits 00051 { 00052 Error("Insufficient memory!"); 00053 Exit(); 00054 } 00055 00056 inline void ExitCorruptFile() 00057 { 00058 Error("Corrupt input file!"); 00059 Exit(); 00060 } 00061 00062 struct XMillException 00063 { 00064 }; 00065 00066 #endif