Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Error.cpp File Reference

#include <stdio.h>
#include <string.h>
#include "Error.hpp"

Go to the source code of this file.

Compounds

struct  ErrLine

Defines

#define ERRMSG_MAXLEN   512

Functions

void Error (char *str, int len)
void Error (char *str)
void ErrorCont (char *str, int len)
void ErrorCont (char *str)
void PrintErrorMsg ()
void Exit ()

Variables

ErrLinecurerrline = NULL
char errmsg [ERRMSG_MAXLEN+1]
char * curptr = errmsg
int errstrlen
char * msgptr = errmsg+ERRMSG_MAXLEN-1
XMillException e


Define Documentation

#define ERRMSG_MAXLEN   512
 

Definition at line 41 of file Error.cpp.


Function Documentation

void Error char *    str
 

Definition at line 72 of file Error.cpp.

00074 {
00075    Error(str,strlen(str));
00076 }

void Error char *    str,
int    len
 

Definition at line 57 of file Error.cpp.

00059 {
00060    if((curptr-errmsg)+sizeof(ErrLine)+len+1>ERRMSG_MAXLEN)
00061       return;
00062 
00063    ((ErrLine *)curptr)->next=curerrline;
00064    curerrline=(ErrLine *)curptr;
00065 
00066    memcpy(curerrline+1,str,len);
00067    ((char *)(curerrline+1))[len]=0;
00068 
00069    curptr+=sizeof(ErrLine)+len+1;
00070 }

void ErrorCont char *    str
 

Definition at line 91 of file Error.cpp.

00093 {
00094    ErrorCont(str,strlen(str));
00095 }

void ErrorCont char *    str,
int    len
 

Definition at line 78 of file Error.cpp.

00080 {
00081    curptr--;
00082    if((curptr-errmsg)+len+1>ERRMSG_MAXLEN)
00083       return;
00084 
00085    memcpy(curptr,str,len);
00086    curptr[len]=0;
00087 
00088    curptr+=len+1;
00089 }

void Exit  
 

Definition at line 113 of file Error.cpp.

Referenced by ExitCorruptFile(), FindEndOfParamString(), Output::GetDataPtr(), HandleBinOp(), HandleCloseParenc(), HandleUnaryOp(), InterpretOptionString(), ParseOptionFile(), ParseString(), VRegExpr::ParseVRegExpr(), MemStreamer::ReleaseByteBlock(), XMLOutput::endAttribute(), XMLOutput::endElement(), XMLOutput::startAttribute(), and XMLOutput::startElement().

00114 {
00115 //   PrintErrorMsg();
00116    throw &e;
00117 }

void PrintErrorMsg  
 

Definition at line 97 of file Error.cpp.

00099 {
00100    while(curerrline!=NULL)
00101    {
00102       printf("%s\n",(char *)(curerrline+1));
00103       curerrline=curerrline->next;
00104    }
00105 
00106    curptr=errmsg;
00107    msgptr=errmsg+ERRMSG_MAXLEN-1;
00108 }


Variable Documentation

ErrLine* curerrline = NULL
 

Definition at line 50 of file Error.cpp.

char* curptr = errmsg
 

Definition at line 53 of file Error.cpp.

XMillException e
 

Definition at line 111 of file Error.cpp.

char errmsg[ERRMSG_MAXLEN+1]
 

Definition at line 52 of file Error.cpp.

int errstrlen
 

Definition at line 54 of file Error.cpp.

char* msgptr = errmsg+ERRMSG_MAXLEN-1
 

Definition at line 55 of file Error.cpp.


Generated on Sat Oct 13 16:08:47 2001 for XMILL by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001