InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ErrorUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: jargast
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ErrorUtils__
25 #define __ErrorUtils__
26 
27 #include "PMString.h"
28 
38 {
39 public:
65  static void PMSetGlobalErrorCode (ErrorCode errCode, const PMString* errString = nil, IPMUnknown* errInfo = nil, const PMString* contextInfo = nil);
66 
70  static ErrorCode PMGetGlobalErrorCode();
71 
76 
81 
87 
95  static PMString PMGetErrorString (ErrorCode errCode, IPMUnknown* errInfo = nil);
96 
102  static PMString PMLoadErrorStringFromRsrc( ErrorCode errCode, PluginID errorRsrcPluginId, RsrcID errorTableId );
103 
106  static void SetExitCode( int16 exitCode );
107 
110  static int16 GetExitCode();
111 };
112 
113 
118 {
119  public:
121 
123 
126  void DoNotRestoreErrorState();
127 
128  private:
129  ErrorCode fErrorCode;
130  bool16 fIsPlatform;
131  IPMUnknown * fErrInfo;
132  PMString fContextString;
133  PMString fErrorString;
134  bool16 fDoRestore;
135  bool16 fExplicitString;
136 };
137 
138 #endif