-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathApiAlreadyAuthenticatedException.cs
More file actions
39 lines (36 loc) · 2.17 KB
/
ApiAlreadyAuthenticatedException.cs
File metadata and controls
39 lines (36 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2026, Siemens AG
//
// SPDX-License-Identifier: MIT
using System;
namespace Siemens.Simatic.S7.Webserver.API.Exceptions
{
/// <summary>
/// "The given X-Auth-Token is already authenticated. Use Api.Logout before logging in again"
/// </summary>
public class ApiAlreadyAuthenticatedException : Exception
{
private static readonly string message = "The given X-Auth-Token is already authenticated. Use Api.Logout before logging in again";
/// <summary>
/// "The given X-Auth-Token is already authenticated. Use Api.Logout before logging in again"
/// </summary>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified.</param>
public ApiAlreadyAuthenticatedException(Exception innerException) : base(message, innerException) { }
/// <summary>
/// "The given X-Auth-Token is already authenticated. Use Api.Logout before logging in again"
/// </summary>
public ApiAlreadyAuthenticatedException() : base(message) { }
/// <summary>
/// "The given X-Auth-Token is already authenticated. Use Api.Logout before logging in again"
/// </summary>
/// <param name="userMessage">Further information about the error message that explains the reason for the exception.</param>
public ApiAlreadyAuthenticatedException(string userMessage) : base(message + Environment.NewLine + userMessage) { }
/// <summary>
/// "The given X-Auth-Token is already authenticated. Use Api.Logout before logging in again"
/// </summary>
/// <param name="userMessage">Further information about the error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified.</param>
public ApiAlreadyAuthenticatedException(string userMessage, Exception innerException) : base(message + Environment.NewLine + userMessage, innerException) { }
}
}