-
Notifications
You must be signed in to change notification settings - Fork 2k
/
LimitExceededException.cs
33 lines (27 loc) · 1.23 KB
/
LimitExceededException.cs
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
using System;
using System.Runtime.Serialization;
namespace Orleans.Runtime
{
/// <summary>
/// Signifies that a silo is in an overloaded state where some
/// runtime limit setting is currently being exceeded,
/// and so that silo is unable to currently accept this message being sent.
/// </summary>
/// <remarks>
/// This situation is often a transient condition.
/// The message is likely to be accepted by this or another silo if it is retransmitted at a later time.
/// </remarks>
[Serializable]
public class LimitExceededException : OrleansException
{
public LimitExceededException() : base("Limit exceeded") { }
public LimitExceededException(string message) : base(message) { }
public LimitExceededException(string message, Exception innerException) : base(message, innerException) { }
public LimitExceededException(string limitName, int current, int threshold, object extraInfo)
: base(string.Format("Limit exceeded {0} Current={1} Threshold={2} {3}", limitName, current, threshold, extraInfo)) { }
protected LimitExceededException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}