/*****************************************************************************/
/*
                                 Error.h
*/
/*****************************************************************************/

#ifndef ERROR_H_LOADED
#define ERROR_H_LOADED 1

#include "wasd.h"

#define ERROR_REPORT_BASIC     1
#define ERROR_REPORT_DETAILED  2
#define ERROR_REPORT_TUNNEL       3

#define ERROR_REPORTED(rqptr) (rqptr->rqResponse.ErrorReportPtr)
#define ERROR_REPORTED_BY_SCRIPT(rqptr) (rqptr->rqCgi.ScriptControlErrorTextPtr)

/***********************/
/* function prototypes */
/***********************/

void ErrorHeapAlloc (REQUEST_STRUCT*, char*, int);
void ErrorExitVmsStatus (int, char*, char*, int);
void ErrorGeneral (REQUEST_STRUCT*, char*, ...);
void ErrorGeneralOverflow (REQUEST_STRUCT*, char*, int);
void ErrorInternal (REQUEST_STRUCT*, int, char*, char*, int);
void ErrorMessageDividerAst (REQUEST_STRUCT*);
void ErrorNoticed (REQUEST_STRUCT*, int, char*, char*, int, ...);
#define ReportSuccess ErrorReportSuccess
void ErrorRedirectQueryString (REQUEST_STRUCT*, int, char*, char*, char*, int);
void ErrorReportSuccess (REQUEST_STRUCT*, char*, ...);
void ErrorReportHeader (REQUEST_STRUCT*, ulong**);
void ErrorReportEndHeader (REQUEST_STRUCT*, ulong**);
void ErrorReportFooter (REQUEST_STRUCT*, ulong**);
void ErrorSendToClient (REQUEST_STRUCT*);
void ErrorServerShutdown (ushort);
char* ErrorSourceInfo (char*, int);
void ErrorVmsStatus (REQUEST_STRUCT*, int, char*, int);

#endif /* ERROR_H_LOADED */

/*****************************************************************************/

