Error Event

Fired when a class or protocol error occurs.

Syntax

ANSI (Cross Platform)
virtual int FireError(STOMPErrorEventParams *e);
typedef struct {
int ErrorCode;
const char *Description;
const char *Data; int lenData; int reserved; } STOMPErrorEventParams; Unicode (Windows) virtual INT FireError(STOMPErrorEventParams *e);
typedef struct {
INT ErrorCode;
LPCWSTR Description;
LPCSTR Data; INT lenData; INT reserved; } STOMPErrorEventParams;
- (void)onError:(int)errorCode :(NSString*)description :(NSData*)data;
#define EID_STOMP_ERROR 4

virtual INT IPWORKSIOT_CALL FireError(INT &iErrorCode, LPSTR &lpszDescription, LPSTR &lpData, INT &lenData);

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally the class fails with an error.

ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

STOMP Protocol Errors

The class will fire the Error event anytime the server reports a STOMP protocol error (i.e., the class receives an ERROR frame).

When this occurs, ErrorCode will be 600, Description will reflect the value of the ERROR frame's message header, and Data will contain the body of the ERROR frame (if one is present).

The ErrorHeaders configuration setting will also be populated with the raw headers from the ERROR frame for the duration of the Error event handler.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 C++ Edition - Version 20.0 [Build 8265]