-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInvalidDataException.cs
More file actions
45 lines (38 loc) · 1.28 KB
/
Copy pathInvalidDataException.cs
File metadata and controls
45 lines (38 loc) · 1.28 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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ClarkKent
{
[Serializable]
class InvalidDataException : System.ApplicationException
{
private string _message;
public InvalidDataException() : base() {}
public InvalidDataException(string message) : base(message)
{
_message = message;
}
public InvalidDataException(string message, System.Exception inner) : base(message, inner)
{
_message = message;
}
// Constructor needed for serialization
// when exception propagates from a remoting server to the client.
protected InvalidDataException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
_message = info.GetString("_message");
}
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
{
info.AddValue("_message", this._message);
base.GetObjectData(info, context);
}
public string getMessage()
{
return _message;
}
}
}