Error Suite

The Error Suite provides a way to display error strings to the user in any format. More...

Data Structures

struct  PSErrorSuite1
 The set of routines available in the Error Suite. More...

Defines

#define kPSErrorSuite   "Photoshop Error Suite for Plug-ins"
 Unique identifier for the Error Suite.
#define kPSErrorSuiteVersion1   1
 Current version of the Error Suite.
#define ASZString_defined
 Hands the host a ZString containing the error string to display to the user.

Typedefs

typedef SPAPI SPErr(* SetErrorFromPStringProc )(const Str255 errorString)
 Hands the host a Pascal string containing the error string to display to the user.
typedef SPAPI SPErr(* SetErrorFromCStringProc )(const char *errorString)
 Hand the host a C string containing the error string to display to the user.
typedef struct ASZByteRun * ASZString
typedef SPAPI SPErr(* SetErrorFromZStringProc )(const ASZString zString)
typedef struct PSErrorSuite1 PSErrorSuite1
 The set of routines available in the Error Suite.

Detailed Description

The Error Suite provides a way to display error strings to the user in any format.

Photoshop always makes a copy of the string passed in. The Error Suite is available in Adobe Photoshop 5.0 and later.

Accessing the Suite

The Error suite is referred to as:

  #define kPSErrorSuite         "Photoshop Error Suite for Plug-ins"

The current version of the error suite:

  #define kPSErrorSuiteVersion1 1

The suite is acquired as follows:

  PSErrorSuite1 *sPSErrors;
  error = sSPBasic->AcquireSuite(kPSErrorSuite,
                                 kPSErrorSuiteVersion1,       
                                 &sPSErrors);
  if (error) goto . . . //handle error

For PICA errors, see SPErrorCodes.h.


Define Documentation

#define kPSErrorSuite   "Photoshop Error Suite for Plug-ins"

Unique identifier for the Error Suite.

#define kPSErrorSuiteVersion1   1

Current version of the Error Suite.

Hands the host a ZString containing the error string to display to the user.

Parameters:
zStringThe ZString to display to the user. The host makes a copy.
Returns:
Non-zero error if failure.

Typedef Documentation

typedef SPAPI SPErr(* SetErrorFromPStringProc)(const Str255 errorString)

Hands the host a Pascal string containing the error string to display to the user.

Parameters:
errorStringThe Pascal string to display to the user. The host makes a copy.
Returns:
Non-zero error if failure.
typedef SPAPI SPErr(* SetErrorFromCStringProc)(const char *errorString)

Hand the host a C string containing the error string to display to the user.

The host will make a copy: Hands the host a C string containing the error string to display to the user.

Parameters:
errorStringThe C string to display to the user. The host makes a copy.
Returns:
Non-zero error if failure.
typedef struct ASZByteRun* ASZString
typedef SPAPI SPErr(* SetErrorFromZStringProc)(const ASZString zString)
typedef struct PSErrorSuite1 PSErrorSuite1

The set of routines available in the Error Suite.