-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathApiEntityAccessDeniedException.cs
More file actions
38 lines (36 loc) · 1.85 KB
/
ApiEntityAccessDeniedException.cs
File metadata and controls
38 lines (36 loc) · 1.85 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
// Copyright (c) 2026, Siemens AG
//
// SPDX-License-Identifier: MIT
using System;
namespace Siemens.Simatic.S7.Webserver.API.Exceptions
{
/// <summary>
/// Access to the given entity is denied.
/// </summary>
public class ApiEntityAccessDeniedException : Exception
{
private static readonly string message = "Access to the given entity is denied";
/// <summary>
/// Access to the given entity is denied
/// </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 ApiEntityAccessDeniedException(Exception innerException) : base(message, innerException) { }
/// <summary>
/// Access to the given entity is denied
/// </summary>
public ApiEntityAccessDeniedException() : base(message) { }
/// <summary>
/// Access to the given entity is denied
/// </summary>
/// <param name="userMessage">Further information about the error message that explains the reason for the exception.</param>
public ApiEntityAccessDeniedException(string userMessage) : base(message + Environment.NewLine + userMessage) { }
/// <summary>
/// Access to the given entity is denied
/// </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 ApiEntityAccessDeniedException(string userMessage, Exception innerException) : base(message + Environment.NewLine + userMessage, innerException) { }
}
}