-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathExceptions.cs
More file actions
92 lines (76 loc) · 2.52 KB
/
Exceptions.cs
File metadata and controls
92 lines (76 loc) · 2.52 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// -----------------------------------------------------------------------
// <copyright file="Exceptions.cs" company="Akka.NET Project">
// Copyright (C) 2009-2022 Lightbend Inc. <http://www.lightbend.com>
// Copyright (C) 2013-2022 .NET Foundation <https://github.com/akkadotnet/akka.net>
// </copyright>
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Akka.Actor;
namespace Akka.Discovery.Azure;
/// <summary>
/// Thrown when a prune operation failed
/// </summary>
public sealed class PruneOperationException: AkkaException
{
public PruneOperationException(List<string> reasons)
{
Reasons = reasons;
}
public PruneOperationException(string message, List<string> reasons, Exception? cause = null) : base(message, cause)
{
Reasons = reasons;
}
public PruneOperationException(SerializationInfo info, StreamingContext context) : base(info, context)
{
Reasons = new List<string>();
}
public List<string> Reasons { get; }
public override string Message => $"{base.Message}. Reasons:\n\t-{string.Join("\n\t-", Reasons)}";
}
/// <summary>
/// Thrown when <see cref="ClusterMemberTableClient"/> failed to connect to Azure Table
/// </summary>
public sealed class InitializationException : AkkaException
{
public InitializationException()
{
}
public InitializationException(string message, Exception? cause = null) : base(message, cause)
{
}
public InitializationException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
/// <summary>
/// Thrown when the client failed to update the node entity
/// </summary>
public sealed class UpdateOperationException : AkkaException
{
public UpdateOperationException()
{
}
public UpdateOperationException(string message, Exception? cause = null) : base(message, cause)
{
}
public UpdateOperationException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
/// <summary>
/// Thrown when the client failed to create an entity entry
/// </summary>
public sealed class CreateEntityFailedException : AkkaException
{
public CreateEntityFailedException()
{
}
public CreateEntityFailedException(string message, Exception? cause = null) : base(message, cause)
{
}
public CreateEntityFailedException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}