Show / Hide Table of Contents

# Class BrokerException

Exception thrown when the broker returns an error

##### Inheritance

System.Object
System.Exception
Apache.NMS.NMSException
BrokerException

##### Implements

System.Runtime.Serialization.ISerializable

##### Inherited Members

Apache.NMS.NMSException.exceptionErrorCode
Apache.NMS.NMSException.ErrorCode
System.Exception.GetBaseException()
System.Exception.GetType()
System.Exception.ToString()
System.Exception.Data
System.Exception.HelpLink
System.Exception.HResult
System.Exception.InnerException
System.Exception.Message
System.Exception.Source
System.Exception.StackTrace
System.Exception.TargetSite
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: Apache.NMS.ActiveMQ

###### Assembly: Apache.NMS.ActiveMQ.dll

##### Syntax

    [Serializable]
    public class BrokerException : NMSException, ISerializable

### Constructors

| Improve this Doc View Source

#### BrokerException()

##### Declaration

    public BrokerException()

| Improve this Doc View Source

#### BrokerException(BrokerError)

##### Declaration

    public BrokerException(BrokerError brokerError)

##### Parameters

Type | Name | Description
--- | --- | ---
BrokerError | brokerError |

| Improve this Doc View Source

#### BrokerException(BrokerError, Exception)

##### Declaration

    public BrokerException(BrokerError brokerError, Exception innerException)

##### Parameters

Type | Name | Description
--- | --- | ---
BrokerError | brokerError |
System.Exception | innerException |

| Improve this Doc View Source

#### BrokerException(SerializationInfo, StreamingContext)

Initializes a new instance of the BrokerException class with serialized data. Throws System.ArgumentNullException if the info parameter is null. Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).

##### Declaration

    protected BrokerException(SerializationInfo info, StreamingContext context)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Runtime.Serialization.SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown.
System.Runtime.Serialization.StreamingContext | context | The StreamingContext that contains contextual information about the source or destination.

### Properties

| Improve this Doc View Source

#### BrokerError

##### Declaration

    public BrokerError BrokerError { get; }

##### Property Value

Type | Description
--- | ---
BrokerError |

| Improve this Doc View Source

#### JavaStackTrace

##### Declaration

    public virtual string JavaStackTrace { get; }

##### Property Value

Type | Description
--- | ---
System.String |

### Methods

| Improve this Doc View Source

#### GetObjectData(SerializationInfo, StreamingContext)

When overridden in a derived class, sets the SerializationInfo with information about the exception.

##### Declaration

    public override void GetObjectData(SerializationInfo info, StreamingContext context)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Runtime.Serialization.SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown.
System.Runtime.Serialization.StreamingContext | context | The StreamingContext that contains contextual information about the source or destination.

##### Overrides

Apache.NMS.NMSException.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
| Improve this Doc View Source

#### StackTraceDump(StackTraceElement[])

Generates a nice textual stack trace

##### Declaration

    public static string StackTraceDump(StackTraceElement[] elements)

##### Parameters

Type | Name | Description
--- | --- | ---
StackTraceElement[] | elements |

##### Returns

Type | Description
--- | ---
System.String |

### Implements

System.Runtime.Serialization.ISerializable