| | 1 | | // Copyright (c) Microsoft. All rights reserved. |
| | 2 | | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| | 3 | |
|
| | 4 | | namespace Microsoft.Azure.EventHubs.Processor |
| | 5 | | { |
| | 6 | | using System; |
| | 7 | |
|
| | 8 | | /// <summary> |
| | 9 | | /// Provides data for the <see cref="EventProcessorOptions.NotifyOfException(string, string, System.Exception, strin |
| | 10 | | /// </summary> |
| | 11 | | public sealed class ExceptionReceivedEventArgs |
| | 12 | | { |
| 0 | 13 | | internal ExceptionReceivedEventArgs(string hostname, string partitionId, Exception exception, string action) |
| | 14 | | { |
| 0 | 15 | | this.Hostname = hostname; |
| 0 | 16 | | this.PartitionId = partitionId; |
| 0 | 17 | | this.Exception = exception; |
| 0 | 18 | | this.Action = action; |
| 0 | 19 | | } |
| | 20 | |
|
| | 21 | | /// <summary> |
| | 22 | | /// Allows distinguishing the error source if multiple hosts in a single process. |
| | 23 | | /// </summary> |
| | 24 | | /// <value>The name of the host that experienced the exception.</value> |
| 0 | 25 | | public string Hostname { get; } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Allows distinguishing the error source if multiple hosts in a single process. |
| | 29 | | /// </summary> |
| | 30 | | /// <value>The partition id that experienced the exception.</value> |
| 0 | 31 | | public string PartitionId { get; } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// The exception that was thrown. |
| | 35 | | /// </summary> |
| 0 | 36 | | public Exception Exception { get; } |
| | 37 | |
|
| | 38 | | /// <summary> |
| | 39 | | /// A short string that indicates what general activity threw the exception. |
| | 40 | | /// See EventProcessorHostActionString for a list of possible values. |
| | 41 | | /// </summary> |
| 0 | 42 | | public string Action { get; } |
| | 43 | | } |
| | 44 | | } |