Error Event

Fired when a component or protocol error occurs.

Syntax

public event OnErrorHandler OnError;

public delegate void OnErrorHandler(object sender, StompErrorEventArgs e);

public class StompErrorEventArgs : EventArgs {
  public int ErrorCode { get; }
  public string Description { get; }
  public string Data { get; }
public byte[] DataB { get; } }
Public Event OnError As OnErrorHandler

Public Delegate Sub OnErrorHandler(sender As Object, e As StompErrorEventArgs)

Public Class StompErrorEventArgs Inherits EventArgs
  Public ReadOnly Property ErrorCode As Integer
  Public ReadOnly Property Description As String
  Public ReadOnly Property Data As String
Public ReadOnly Property DataB As Byte() End Class

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally the component throws an exception.

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 component will fire the Error event anytime the server reports a STOMP protocol error (i.e., the component 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 MQ 2020 .NET Edition - Version 20.0 [Build 8155]