HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_ErrorUtil.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_ErrorUtil.h (UT Library, C++)
7  *
8  * COMMENTS: Utilities for error handling
9  */
10 
11 #ifndef __UT_ERRORUTIL_H_INCLUDED__
12 #define __UT_ERRORUTIL_H_INCLUDED__
13 
14 #include "UT_API.h"
16 #include "UT_ErrorManager.h"
17 
18 /// A simple class to push an error manager and ensure that it is popped when
19 /// it goes out of scope.
21 {
22 public:
24  : mySTID(SYSgetSTID())
25  {
26  UTpushErrorManager(mySTID);
27  }
28 
30  {
31  UTpopErrorManager(mySTID);
32  }
33 
34 private:
35  int mySTID;
36 };
37 
38 
39 
40 #endif // __UT_ERRORUTIL_H_INCLUDED__
UT_API void UTpopErrorManager()
SYS_API int SYSgetSTID()
UT_API void UTpushErrorManager()