| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System; |
| | 5 | |
|
| | 6 | | namespace Azure.Messaging.ServiceBus |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// Contains information about the entity whose processing threw an exception, as well as |
| | 10 | | /// the exception that has been thrown. |
| | 11 | | /// </summary> |
| | 12 | | public sealed class ProcessErrorEventArgs : EventArgs |
| | 13 | | { |
| | 14 | | /// <summary> |
| | 15 | | /// Initializes a new instance of the <see cref="ProcessErrorEventArgs" /> class. |
| | 16 | | /// </summary> |
| | 17 | | /// |
| | 18 | | /// <param name="exception">The exception that this event data belongs to.</param> |
| | 19 | | /// <param name="errorSource">The action associated with the message.</param> |
| | 20 | | /// <param name="fullyQualifiedNamespace">The endpoint used when this exception occurred.</param> |
| | 21 | | /// <param name="entityPath">The entity path used when this exception occurred.</param> |
| 0 | 22 | | public ProcessErrorEventArgs( |
| 0 | 23 | | Exception exception, |
| 0 | 24 | | ServiceBusErrorSource errorSource, |
| 0 | 25 | | string fullyQualifiedNamespace, |
| 0 | 26 | | string entityPath) |
| | 27 | | { |
| 0 | 28 | | Exception = exception; |
| 0 | 29 | | ErrorSource = errorSource; |
| 0 | 30 | | FullyQualifiedNamespace = fullyQualifiedNamespace; |
| 0 | 31 | | EntityPath = entityPath; |
| 0 | 32 | | } |
| | 33 | |
|
| | 34 | | /// <summary>Gets the parent class exception to which this Service bus message belongs.</summary> |
| | 35 | | /// |
| | 36 | | /// <value>The exception, generated by the parent class, to which this event data belongs.</value> |
| 0 | 37 | | public Exception Exception { get; } |
| | 38 | |
|
| | 39 | | /// <summary>Gets the action associated with the message.</summary> |
| | 40 | | /// |
| | 41 | | /// <value>The action associated with the event.</value> |
| 0 | 42 | | public ServiceBusErrorSource ErrorSource { get; } |
| | 43 | |
|
| | 44 | | /// <summary>The namespace name used when this exception occurred. This is likely |
| | 45 | | /// to be similar to <c>{yournamespace}.servicebus.windows.net</c>.</summary> |
| 0 | 46 | | public string FullyQualifiedNamespace { get; } |
| | 47 | |
|
| | 48 | | /// <summary>The entity path used when this exception occurred.</summary> |
| 0 | 49 | | public string EntityPath { get; } |
| | 50 | | } |
| | 51 | | } |