| XMP Toolkit SDK 6.0.0

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
AdobeXMPCommon::IError_v1 Class Referenceabstract

Version1 of the interface that represents an error/warning encountered during processing. More...

`#include <IError.h>`

Inheritance diagram for AdobeXMPCommon::IError_v1:

## Public Types
enum | eErrorSeverity { kESNone = 0, kESWarning = 1 << 0, kESOperationFatal = 1 << 1, kESProcessFatal = 1 << 2, kESMaxValue = 1 << 31, kESAll = kAllBits }
| Indicates various types of errors. More...
enum | eErrorDomain { kEDNone = 0, kEDGeneral = 1, kEDMemoryManagement = 2, kEDConfigurable = 3, kEDMultiThreading = 4, kEDDataModel = 100, kEDParser = 101, kEDSerializer = 102, kEDXMPFiles = 200, kEDConflictIdentification = 400, kEDConflictResolution = 500, kEDThreeWayMerge = 600, kEDGenericStrategyDatabase = 601, kEDAssetManagement = 10000, kEDMaxValue = kMaxEnumValue }
| Indicates various types of error domains. More...
typedef uint32 | eErrorCode

## Public Member Functions
virtual eErrorCode APICALL | GetCode () const =0
| Get the error code. More...
virtual eErrorDomain APICALL | GetDomain () const =0
| Get the error domain. More...
virtual eErrorSeverity APICALL | GetSeverity () const =0
| Get the error severity. More...
virtual spcIUTF8String APICALL | GetMessage () const =0
| Get the error message. More...
virtual spcIUTF8String APICALL | GetLocation () const =0
| Get the location of the error origin. More...
virtual spcIUTF8String APICALL | GetParameter (sizet index) const =0
| Get the value of a parameter at a particular index. More...
virtual sizet APICALL | GetParametersCount () const __NOTHROW__=0
| Get the count of parameters. More...
virtual spIError APICALL | SetNextError (const spIError &error)=0
| Set the next error in the chain. More...
virtual void APICALL | SetMessage (const char *message, sizet len=npos) __NOTHROW__=0
| Set the error message. More...
virtual void APICALL | SetLocation (const char *fileName, sizet lineNumber) __NOTHROW__=0
| Set the location of origin of error. More...
virtual void APICALL | AppendParameter (const char *parameter, sizet len=npos) __NOTHROW__=0
| Appends a parameter to the list of parameters. More...
virtual void APICALL | AppendParameter (void *addressParameter) __NOTHROW__=0
| Appends an address as a string to the list of parameters. More...
virtual void APICALL | AppendParameter (const uint32 &integerValue) __NOTHROW__=0
| Appends a 32 bit unsigned integer value as a string to the list of parameters. More...
virtual void APICALL | AppendParameter (const uint64 &integerValue) __NOTHROW__=0
| Appends a 64 bit unsigned integer value as a string to the list of parameters. More...
virtual void APICALL | AppendParameter (const int32 &integerValue) __NOTHROW__=0
| Appends a 32 bit integer value as a string to the list of parameters. More...
virtual void APICALL | AppendParameter (const int64 &integerValue) __NOTHROW__=0
| Appends a 64 bit integer value as a string to the list of parameters. More...
virtual void APICALL | AppendParameter (const float &floatValue) __NOTHROW__=0
| Appends a floating value as a string to the list of parameters. More...
virtual void APICALL | AppendParameter (const double &doubleValue) __NOTHROW__=0
| Appends a double floating value as a string to the list of parameters. More...
virtual void APICALL | AppendParameter (bool booleanValue) __NOTHROW__=0
| Appends a boolean value as a string to the list of parameters. More...
virtual spIError APICALL | GetNextError ()=0
| Get the next error in the chain. More...
XMP_PRIVATE spcIError | GetNextError () const
Public Member Functions inherited from AdobeXMPCommon::ISharedObject
virtual void APICALL | Acquire () const __NOTHROW__=0
| Called by the clients of the object to indicate that he has acquired the shared ownership of the object. More...
virtual void APICALL | Release () const __NOTHROW__=0
| Called by the clients of the object to indicate he has released his shared ownership of the object. If this being the last client than this function should call Destroy to delete and release the memory. More...
Public Member Functions inherited from AdobeXMPCommon::IVersionable
template<typename requestedInterface >
XMP_PRIVATE requestedInterface * | GetInterfacePointer ()
| Get the raw pointer to an interface object implementing the requested version. More...
template<typename requestedInterface >
const XMP_PRIVATE requestedInterface * | GetInterfacePointer () const
| Get the raw pointer to a const interface object implementing the requested version. More...

## Static Public Member Functions
static spIError | CreateError (pIObjectFactory objFactory, eErrorDomain errDomain, eErrorCode errCode, eErrorSeverity errSeverity)
| Creates an error object. More...

## Protected Member Functions
virtual | ~IError_v1 () __NOTHROW__
Protected Member Functions inherited from AdobeXMPCommon::ISharedObject
virtual | ~ISharedObject () __NOTHROW__=0
| REQ_FRIEND_CLASS_DECLARATION ()
Protected Member Functions inherited from AdobeXMPCommon::IVersionable
virtual | ~IVersionable ()
| REQ_FRIEND_CLASS_DECLARATION ()

## Detailed Description

Version1 of the interface that represents an error/warning encountered during processing.

Provides all the functions to get required information regarding error scenario.

Attention
  Do Not support Multi-threading at object level.
  Multi-threading not required since clients will only be provided const objects.

Definition at line 28 of file IError.h.

## Member Typedef Documentation

## ◆ eErrorCode

typedef uint32 AdobeXMPCommon::IError_v1::eErrorCode

Definition at line 111 of file IError.h.

## Member Enumeration Documentation

## ◆ eErrorDomain

enum AdobeXMPCommon::IError_v1::eErrorDomain

Indicates various types of error domains.

Enumerator
kEDNone | No Domain.
kEDGeneral | Indicates error related to general conditions.
kEDMemoryManagement | Indicates error related to memory allocation-deallocation conditions.
kEDConfigurable | Indicates error related to configurable APIs.
kEDMultiThreading | Indicates error releated to multithreading.
kEDDataModel | Indicates error related to XMP Data Model Management.
kEDParser | Indicates error related to XMP Parsing.
kEDSerializer | Indicates error related to XMP Serializing.
kEDXMPFiles | Indicates error related to dealing with XMP in various file formats.
kEDConflictIdentification | Indicates error related to Conflict Identification.
kEDConflictResolution | Indicates error related to Conflict Resolution.
kEDThreeWayMerge | Indicates error related to 3 Way Merge.
kEDGenericStrategyDatabase | Indicates error related to Generic Strategy Database.
kEDAssetManagement | Indicates error related to Asset Management.
kEDMaxValue | Maximum value this enum can hold, should be treated as invalid value.

Definition at line 62 of file IError.h.

62 {
64 kEDNone = 0,
65
67 kEDGeneral = 1,
68
70 kEDMemoryManagement = 2,
71
73 kEDConfigurable = 3,
74
76 kEDMultiThreading = 4,
77
79 kEDDataModel = 100,
80
82 kEDParser = 101,
83
85 kEDSerializer = 102,
86
87
89 kEDXMPFiles = 200,
90
91
93 kEDConflictIdentification = 400,
94
96 kEDConflictResolution = 500,
97
99 kEDThreeWayMerge = 600,
100
102 kEDGenericStrategyDatabase = 601,
103
105 kEDAssetManagement = 10000,
106
108 kEDMaxValue = kMaxEnumValue
109 } eErrorDomain;

## ◆ eErrorSeverity

enum AdobeXMPCommon::IError_v1::eErrorSeverity

Indicates various types of errors.

Enumerator
kESNone | No severity, not to be used.
kESWarning | Recovery is possible, client can choose to ignore and let library continue with the best possible way.
kESOperationFatal | Recovery is not possible, an exception of type pcIError_base will be thrown aborting the API call.
kESProcessFatal | Recovery is not possible, an exception of type pcIError_base will be thrown, client should abort the process.
kESMaxValue | Maximum value this enum can hold, should be treated as invalid value.
kESAll | Union of all severities.

Definition at line 36 of file IError.h.

36 {
38 kESNone = 0,
39
41 kESWarning = 1 << 0,
42
44 kESOperationFatal = 1 << 1,
45
47 kESProcessFatal = 1 << 2,
48
49 // Add new severities here
50
52 kESMaxValue = 1 << 31,
53
55 kESAll = kAllBits,
56 } eErrorSeverity;

## Constructor & Destructor Documentation

## ◆ ~IError_v1()

virtual AdobeXMPCommon::IError_v1::~IError_v1 | ( |  | ) |
| inline protected virtual

Destructor

Definition at line 316 of file IError.h.

316 {}

## Member Function Documentation

## ◆ AppendParameter() [1/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | bool | booleanValue | ) |
| pure virtual

Appends a boolean value as a string to the list of parameters.

Parameters

  [in] | booleanValue | A value of bool type containing the boolean value to be used as parameter.

## ◆ AppendParameter() [2/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | const char * | parameter,
|  | sizet | len = `npos`
| ) |  |
| pure virtual

Appends a parameter to the list of parameters.

Parameters

  [in] | parameter | Pointer to a constant char buffer containing parameter. It can be null terminated or not. NULL pointer will be treated as empty message string.
  [in] | len | A value of AdobeXMPCommon::sizet indicating the length in case parameter is not null terminated. In case parameter is null terminated it can be set to its default value ( npos ).

## ◆ AppendParameter() [3/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | const double & | doubleValue | ) |
| pure virtual

Appends a double floating value as a string to the list of parameters.

Parameters

  [in] | doubleValue | A value of double type containing the floating value to be used as parameter.

## ◆ AppendParameter() [4/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | const float & | floatValue | ) |
| pure virtual

Appends a floating value as a string to the list of parameters.

Parameters

  [in] | floatValue | A value of float type containing the floating value to be used as parameter.

## ◆ AppendParameter() [5/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | const int32 & | integerValue | ) |
| pure virtual

Appends a 32 bit integer value as a string to the list of parameters.

Parameters

  [in] | integerValue | A value of AdobeXMPCommon::int32 type containing the integral value to be used as parameter.

## ◆ AppendParameter() [6/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | const int64 & | integerValue | ) |
| pure virtual

Appends a 64 bit integer value as a string to the list of parameters.

Parameters

  [in] | integerValue | A value of AdobeXMPCommon::uint64 type containing the integral value to be used as parameter.

## ◆ AppendParameter() [7/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | const uint32 & | integerValue | ) |
| pure virtual

Appends a 32 bit unsigned integer value as a string to the list of parameters.

Parameters

  [in] | integerValue | A value of AdobeXMPCommon::uint32 type containing the integral value to be used as parameter.

## ◆ AppendParameter() [8/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | const uint64 & | integerValue | ) |
| pure virtual

Appends a 64 bit unsigned integer value as a string to the list of parameters.

Parameters

  [in] | integerValue | A value of AdobeXMPCommon::uint64 type containing the integral value to be used as parameter.

## ◆ AppendParameter() [9/9]

virtual void APICALL AdobeXMPCommon::IError_v1::AppendParameter | ( | void * | addressParameter | ) |
| pure virtual

Appends an address as a string to the list of parameters.

Parameters

  [in] | addressParameter | A value of void * type containing the address of the location to be used as parameter.

## ◆ CreateError()

static spIError AdobeXMPCommon::IError_v1::CreateError | ( | pIObjectFactory | objFactory,
|  | eErrorDomain | errDomain,
|  | eErrorCode | errCode,
|  | eErrorSeverity | errSeverity
| ) |  |
| static

Creates an error object.

Parameters

  [in] | objFactory | A pointer to IObjectFactory object.
  [in] | errDomain | A value of eErrorDomain indicating the error domain.
  [in] | errCode | A value of eErrorCode indicating the error code.
  [in] | errSeverity | A value of eErrorSeverity indicating the severity of the error.

Returns
  A shared pointer to an object of IError_v1.

## ◆ GetCode()

virtual eErrorCode APICALL AdobeXMPCommon::IError_v1::GetCode | ( |  | ) | const
| pure virtual

Get the error code.

Returns
  An object of type eErrorCode indicating the error code.

## ◆ GetDomain()

virtual eErrorDomain APICALL AdobeXMPCommon::IError_v1::GetDomain | ( |  | ) | const
| pure virtual

Get the error domain.

Returns
  An object of type eErrorDomain indicating the error domain.

## ◆ GetLocation()

virtual spcIUTF8String APICALL AdobeXMPCommon::IError_v1::GetLocation | ( |  | ) | const
| pure virtual

Get the location of the error origin.

Returns
  A shared pointer to const AdobeXMPCommon::IUTF8String object containing location as like file name and line number.

Note
  For debugging use only.

## ◆ GetMessage()

virtual spcIUTF8String APICALL AdobeXMPCommon::IError_v1::GetMessage | ( |  | ) | const
| pure virtual

Get the error message.

Error message contains a descriptive string, for debugging use only. It must not be shown to users in a final product. It is written for developers, not users, and never localized.

Returns
  A shared pointer to const AdobeXMPCommon::IUTF8String object containing message string.

## ◆ GetNextError() [1/2]

XMP_PRIVATE spcIError AdobeXMPCommon::IError_v1::GetNextError | ( |  | ) | const
| inline

Definition at line 173 of file IError.h.

173 {
174 return const_cast< IError_v1 * >( this )->GetNextError();
175 }

## ◆ GetNextError() [2/2]

virtual spIError APICALL AdobeXMPCommon::IError_v1::GetNextError | ( |  | ) |
| pure virtual

Get the next error in the chain.

Returns
  A pointer to const/non-const #AdobeXMPCommon::IError object which is the next error in the chain.

Note
  Return an invalid shared pointer in case it is the last error object in the chain.

## ◆ GetParameter()

virtual spcIUTF8String APICALL AdobeXMPCommon::IError_v1::GetParameter | ( | sizet | index | ) | const
| pure virtual

Get the value of a parameter at a particular index.

Based on each error condition various parameters are stored along with the error object. Clients can one by one get access to each parameter that can be later used for debugging.

Parameters

  [in] | index | A value of #AdobeXMPCommon::sizet indicating the index of the parameter client is interested in retrieving.

Returns
  A shared pointer to const #AdobeXMPCommon::IUTF8String object containing some string.

Attention
  Throws #AdobeXMPCommon::pcIError_base in case index is out of bounds.

Note
  For debugging use only.

## ◆ GetParametersCount()

virtual sizet APICALL AdobeXMPCommon::IError_v1::GetParametersCount | ( |  | ) | const
| pure virtual

Get the count of parameters.

Returns
  An object of type #AdobeXMPCommon::sizet containing the count of paramaters associated with the error object.

## ◆ GetSeverity()

virtual eErrorSeverity APICALL AdobeXMPCommon::IError_v1::GetSeverity | ( |  | ) | const
| pure virtual

Get the error severity.

Returns
  An object of type eErrorSeverity indicating the severity of error.

## ◆ SetLocation()

virtual void APICALL AdobeXMPCommon::IError_v1::SetLocation | ( | const char * | fileName,
|  | sizet | lineNumber
| ) |  |
| pure virtual

Set the location of origin of error.

Parameters

  [in] | fileName | Pointer to a null terminated char buffer containing the file name from which the error originated. NULL pointer will be treated as empty fileName.
  [in] | lineNumber | A value of #AdobeXMPCommon::sizet indicating the line in source file from which the error originated.

## ◆ SetMessage()

virtual void APICALL AdobeXMPCommon::IError_v1::SetMessage | ( | const char * | message,
|  | sizet | len = `npos`
| ) |  |
| pure virtual

Set the error message.

Parameters

  [in] | message | Pointer to a constant char buffer containing message. It can be null terminated or not. NULL pointer will be treated as empty message string.
  [in] | len | A value of #AdobeXMPCommon::sizet indicating the length in case message is not null terminated. In case message is null terminated it can be set to its default value ( npos ).

## ◆ SetNextError()

virtual spIError APICALL AdobeXMPCommon::IError_v1::SetNextError | ( | const spIError & | error | ) |
| pure virtual

Set the next error in the chain.

Parameters

  [in] | error | A pointer to #AdobeXMP::IError object which will be the next error in the chain.

Returns
  A pointer to #AdobeXMPCommon::IError object which is the current next error in the chain.

Note
  Return an invalid pointer in case there is no current next error in the chain.

The documentation for this class was generated from the following file:

- public/include/XMPCommon/Interfaces/IError.h

AdobeXMPCommon::IError_v1::eErrorSeverity
eErrorSeverity
Indicates various types of errors.
Definition: IError.h:36
AdobeXMPCommon::IError_v1::kEDMemoryManagement
@ kEDMemoryManagement
Indicates error related to memory allocation-deallocation conditions.
Definition: IError.h:70
AdobeXMPCommon::IError_v1::kESProcessFatal
@ kESProcessFatal
Recovery is not possible, an exception of type pcIError_base will be thrown, client should abort the ...
Definition: IError.h:47
AdobeXMPCommon::IError_v1::kEDDataModel
@ kEDDataModel
Indicates error related to XMP Data Model Management.
Definition: IError.h:79
AdobeXMPCommon::IError_v1::kESMaxValue
@ kESMaxValue
Maximum value this enum can hold, should be treated as invalid value.
Definition: IError.h:52
AdobeXMPCommon::IError_v1::kEDConflictResolution
@ kEDConflictResolution
Indicates error related to Conflict Resolution.
Definition: IError.h:96
AdobeXMPCommon::kMaxEnumValue
static const uint32 kMaxEnumValue(Max_XMP_Uns32)
AdobeXMPCommon::IError_v1::kEDSerializer
@ kEDSerializer
Indicates error related to XMP Serializing.
Definition: IError.h:85
AdobeXMPCommon::IError_v1::kEDGenericStrategyDatabase
@ kEDGenericStrategyDatabase
Indicates error related to Generic Strategy Database.
Definition: IError.h:102
AdobeXMPCommon::IError_v1::kEDXMPFiles
@ kEDXMPFiles
Indicates error related to dealing with XMP in various file formats.
Definition: IError.h:89
AdobeXMPCommon::IError_v1::eErrorDomain
eErrorDomain
Indicates various types of error domains.
Definition: IError.h:62
AdobeXMPCommon::IError_v1::kEDParser
@ kEDParser
Indicates error related to XMP Parsing.
Definition: IError.h:82
AdobeXMPCommon::IError_v1::kEDMultiThreading
@ kEDMultiThreading
Indicates error releated to multithreading.
Definition: IError.h:76
AdobeXMPCommon::IError_v1::GetNextError
virtual spIError APICALL GetNextError()=0
Get the next error in the chain.
AdobeXMPCommon::IError_v1::kEDConflictIdentification
@ kEDConflictIdentification
Indicates error related to Conflict Identification.
Definition: IError.h:93
AdobeXMPCommon::IError_v1::kEDThreeWayMerge
@ kEDThreeWayMerge
Indicates error related to 3 Way Merge.
Definition: IError.h:99
AdobeXMPCommon::IError_v1::kEDMaxValue
@ kEDMaxValue
Maximum value this enum can hold, should be treated as invalid value.
Definition: IError.h:108
AdobeXMPCommon::IError_v1::kEDGeneral
@ kEDGeneral
Indicates error related to general conditions.
Definition: IError.h:67
AdobeXMPCommon::IError_v1::kESNone
@ kESNone
No severity, not to be used.
Definition: IError.h:38
AdobeXMPCommon::IError_v1::kESAll
@ kESAll
Union of all severities.
Definition: IError.h:55
AdobeXMPCommon::IError_v1::kEDConfigurable
@ kEDConfigurable
Indicates error related to configurable APIs.
Definition: IError.h:73
AdobeXMPCommon::IError_v1::kEDNone
@ kEDNone
No Domain.
Definition: IError.h:64
AdobeXMPCommon::IError_v1::kEDAssetManagement
@ kEDAssetManagement
Indicates error related to Asset Management.
Definition: IError.h:105
AdobeXMPCommon::IError_v1::kESOperationFatal
@ kESOperationFatal
Recovery is not possible, an exception of type pcIError_base will be thrown aborting the API call.
Definition: IError.h:44
AdobeXMPCommon::kAllBits
static const uint32 kAllBits(0xFFFFFFFF)
AdobeXMPCommon::IError_v1::kESWarning
@ kESWarning
Recovery is possible, client can choose to ignore and let library continue with the best possible way...
Definition: IError.h:41