![]() | InDesign SDK 20.5 |
#include <IErrorState.h>

Public Types | |
| enum | { kDefaultIID = IID_IERRORSTATE } |
Public Member Functions | |
| virtual void | Set (ErrorCode errCode, const PMString *errStr=nil, IPMUnknown *errInfo=nil, const PMString *errContext=nil)=0 |
| virtual ErrorCode | GetErrorCode () const =0 |
| virtual PMString | GetErrorString () const =0 |
| virtual IPMUnknown * | QueryErrorInfo () const =0 |
| virtual PMString | GetContextInfo () const =0 |
| virtual bool16 | IsExplicitString () const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Interface that stores the global error state, and hangs off the session (kSessionBoss); use the methods in ErrorUtils rather than this interface to manipulate the global error state.
The application maintains a global error state associated with the session. When an error happens, the error should be posted to the global error state via IErrorState, and the error returned by the function.
Usually you don't access this directly: ErrorUtils is a handy shell over this function.
| pure virtual |
Return the context info. Typically this is empty, except in Macintosh Debug where it may contain a stack trace of the location that set the error code.
| pure virtual |
Get the current error code
| pure virtual |
Return the current error string. Attempts to resolve it via the error registry if the string was not set explicitly.
| pure virtual |
Returns kTrue if the error string was set explicitly in the call to Set.
| pure virtual |
Return the error info object, (errInfo passed into Set). Client must release it when done with it.
| pure virtual |
Sets the current error code to errCode. If no string is passed in the error state will find a string based on the code (see IErrorCodeService). Set platformErr to true if the error code is from the platform. errInfo can be an error specific object that contains more information about the error. The object only means something to the originator of the error and the handler of the error. For instance, suppose the error is "file %s not found", where you want s to be filled in with the filename. It could be that associated with the file not found error is an object containing the filename. SetErrorCode AddRefs on errInfo and makes a copy of the string pointed to be errStr.