| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System; |
| | 5 | | using System.Collections.Generic; |
| | 6 | | using System.Text; |
| | 7 | | using System.Linq; |
| | 8 | |
|
| | 9 | | namespace Azure.Identity |
| | 10 | | { |
| | 11 | | /// <summary> |
| | 12 | | /// An exception class raised for errors in authenticating client requests. |
| | 13 | | /// </summary> |
| | 14 | | public class AuthenticationFailedException : Exception |
| | 15 | | { |
| | 16 | | /// <summary> |
| | 17 | | /// Creates a new AuthenticationFailedException with the specified message. |
| | 18 | | /// </summary> |
| | 19 | | /// <param name="message">The message describing the authentication failure.</param> |
| | 20 | | public AuthenticationFailedException(string message) |
| 16 | 21 | | : this(message, null) |
| | 22 | | { |
| 16 | 23 | | } |
| | 24 | |
|
| | 25 | | /// <summary> |
| | 26 | | /// Creates a new AuthenticationFailedException with the specified message. |
| | 27 | | /// </summary> |
| | 28 | | /// <param name="message">The message describing the authentication failure.</param> |
| | 29 | | /// <param name="innerException">The exception underlying the authentication failure.</param> |
| | 30 | | public AuthenticationFailedException(string message, Exception innerException) |
| 2870 | 31 | | : base(message, innerException) |
| | 32 | | { |
| 2870 | 33 | | } |
| | 34 | |
|
| | 35 | | internal static AuthenticationFailedException CreateAggregateException(string message, IList<Exception> innerExc |
| | 36 | | { |
| 8 | 37 | | return new AuthenticationFailedException(message, new AggregateException("Multiple exceptions were encounter |
| | 38 | | } |
| | 39 | | } |
| | 40 | | } |