aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers.Serialization/RecursionLimitExceeded.cs
blob: 7a956954daa311a01789f12462e13e4573b5917b (plain) (blame)
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
using System;
using System.Collections.Generic;
using System.Text;

namespace Google.ProtocolBuffers.Serialization
{
    /// <summary>
    /// The exception raised when a recursion limit is reached while parsing input.
    /// </summary>
#if !SILVERLIGHT
    [Serializable]
#endif
    public sealed class RecursionLimitExceededException : FormatException
    {
        const string message = "Possible malicious message had too many levels of nesting.";
        
        internal RecursionLimitExceededException() : base(message)
        {
        }

#if !SILVERLIGHT
        private RecursionLimitExceededException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            : base(info, context)
        {
        }
#endif
    }
}