forked from PeterWaher/IoTGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSerializationException.cs
More file actions
34 lines (30 loc) · 893 Bytes
/
SerializationException.cs
File metadata and controls
34 lines (30 loc) · 893 Bytes
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
using System;
using Waher.Events;
namespace Waher.Persistence.Serialization
{
/// <summary>
/// Exception ocurring during serialization or deserialization of objects.
/// </summary>
public class SerializationException : Exception, IEventObject
{
private readonly Type type;
/// <summary>
/// Exception ocurring during serialization or deserialization of objects.
/// </summary>
/// <param name="Message">Exception message</param>
/// <param name="Type">Type of object being serialized or deserialized.</param>
public SerializationException(string Message, Type Type)
: base(Message)
{
this.type = Type;
}
/// <summary>
/// Type of object being serialized or deserialized.
/// </summary>
public Type Type => this.type;
/// <summary>
/// Object identifier related to the object.
/// </summary>
public string Object => this.type.FullName;
}
}