Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HErrorManager.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2000 by Tech Soft 3D, LLC.
3 // The information contained herein is confidential and proprietary to
4 // Tech Soft 3D, LLC., and considered a trade secret as defined under
5 // civil and criminal statutes. Tech Soft 3D shall pursue its civil
6 // and criminal remedies in the event of unauthorized use or misappropriation
7 // of its trade secrets. Use of this information by anyone other than
8 // authorized employees of Tech Soft 3D, LLC. is granted only under a
9 // written non-disclosure agreement, expressly prescribing the scope and
10 // manner of such use.
11 //
12 // $Id: cb06da90252653dfa061825acb45e859b320aa06 $
13 //
18 #ifndef _HERRORMANAGER_H
19 #define _HERRORMANAGER_H
20 
21 #ifdef H_PACK_8
22 #pragma pack(push)
23 #pragma pack(8)
24 #endif
25 
26 #include "HTools.h"
27 
28 /* forward declaration.
29  * private helper class */
30 class HErrorDescriptorNode;
31 
34 {
35  HSuppressInfo(int s, int c, int sp)
36  {
37  severity = s;
38  category = c;
39  specific = sp;
40  }
41  int severity;
42  int category;
43  int specific;
44 };
45 
46 
48 
50 class MVO_API HErrorNode
51 {
52 
53 public:
65  HErrorNode(int category, int specific, int severity, int msgc, char **msgv, int stackc, char ** stackv, double time);
66  ~HErrorNode();
67 
70  void Report();
71 
76  double m_time;
77  char **m_message;
79  char **m_stack;
80 
81 
82 };
83 
84 
85 
86 
88 
90 class MVO_API HErrorManager
91 {
92 private:
93  static struct vlist_s * m_ErrorList;
94  static struct vlist_s * m_UpdateErrorList;
95  static struct vlist_s * m_SuppressList;
96  static void (* m_pfError)(HErrorNode *, void *);
97  static void * m_UserData;
98  static bool * m_ErrorClass;
99  static bool m_bShowDialog;
100  static bool m_bDialogRunning;
101  static bool m_bBlocked;
102  static bool m_bInterrupted;
103  static bool m_bSpoolUpdateErrors;
104 
105 public:
109  static void Init();
112  static void Cleanup();
116  static void BeginErrorIteration();
119  static HErrorNode * GetNextError();
122  static HErrorNode * GetLastError();
125  static void DeleteLastError();
128  static void ShowAllErrors();
134  static void SpoolUpdateErrors();
135 
137  static void SetErrorCallback(void (* err)(HErrorNode *, void *), void *user_data) { m_pfError = err; m_UserData = user_data; }
138 
148  static void SuppressError(int severity, int category, int specific);
149 
151  static void Flush();
152 
156  static void SetShowDialog(bool s) { m_bShowDialog = s; }
159  static void SetSpoolUpdateErrors(bool s) { m_bSpoolUpdateErrors = s; }
162  static bool GetShowDialog() { return m_bShowDialog; }
166  static void AllowAllErrors();
167 
169  static bool GetDialogRunning() { return m_bDialogRunning; }
170 
187  static void CallbackEntryPoint(
188  int category, int specific, int severity,
189  int msgc, char **msgv, int stackc, char **stackv
190  );
191 
192 };
193 
194 
195 
196 #ifdef H_PACK_8
197 #pragma pack(pop)
198 #endif
199 
200 #endif
201 
202 
203 
The HErrorManager class handles all the error messaging in MVO.
Definition: HErrorManager.h:90
double m_time
The time that the error was generated in seconds.
Definition: HErrorManager.h:76
int severity
The level of seriousness of this error.
Definition: HErrorManager.h:41
int m_category
The category that this error falls under as described in HC_Define_Error_Handler. ...
Definition: HErrorManager.h:72
int m_severity
The level of seriousness of this error.
Definition: HErrorManager.h:74
static void SetShowDialog(bool s)
Definition: HErrorManager.h:156
int m_specific
The specific error under the category as described in HC_Define_Error_Handler.
Definition: HErrorManager.h:73
int category
The category that this error falls under as described in HC_Define_Error_Handler. ...
Definition: HErrorManager.h:42
The HErrorNode class encapsulates error message information.
Definition: HErrorManager.h:50
char ** m_stack
The list of functions that generated the error.
Definition: HErrorManager.h:79
int m_messagelength
The number of messages associated with this error.
Definition: HErrorManager.h:75
static bool GetShowDialog()
Definition: HErrorManager.h:162
char ** m_message
The list messages associated with the error.
Definition: HErrorManager.h:77
static bool GetDialogRunning()
Definition: HErrorManager.h:169
static void SetErrorCallback(void(*err)(HErrorNode *, void *), void *user_data)
Definition: HErrorManager.h:137
int specific
The specific error under the category as described in HC_Define_Error_Handler.
Definition: HErrorManager.h:43
static void SetSpoolUpdateErrors(bool s)
Definition: HErrorManager.h:159
The HSuppressInfo contains information used to identify which errors should be suppressed.
Definition: HErrorManager.h:33
int m_stacklength
The length of the call stack.
Definition: HErrorManager.h:78