ProtobufTest/Assets/Plugs/protobuf-net/ProtoException.cs

31 lines
1.0 KiB
C#
Raw Normal View History

2024-05-08 13:44:40 +08:00
using System;
#if PLAT_BINARYFORMATTER && !(COREFX || PROFILE259)
using System.Runtime.Serialization;
#endif
namespace ProtoBuf
{
/// <summary>
/// Indicates an error during serialization/deserialization of a proto stream.
/// </summary>
#if PLAT_BINARYFORMATTER && !(COREFX || PROFILE259)
[Serializable]
#endif
public class ProtoException : Exception
{
/// <summary>Creates a new ProtoException instance.</summary>
public ProtoException() { }
/// <summary>Creates a new ProtoException instance.</summary>
public ProtoException(string message) : base(message) { }
/// <summary>Creates a new ProtoException instance.</summary>
public ProtoException(string message, Exception innerException) : base(message, innerException) { }
#if PLAT_BINARYFORMATTER && !(COREFX || PROFILE259)
/// <summary>Creates a new ProtoException instance.</summary>
protected ProtoException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
}
}