forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessagingException.cs
More file actions
41 lines (37 loc) · 842 Bytes
/
Copy pathMessagingException.cs
File metadata and controls
41 lines (37 loc) · 842 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
35
36
37
38
39
40
41
using System;
using System.Runtime.Serialization;
namespace ServiceStack.Messaging
{
/// <summary>
/// Base Exception for all ServiceStack.Messaging exceptions
/// </summary>
public class MessagingException
: Exception
{
public MessagingException()
{
}
public MessagingException(string message)
: base(message)
{
}
public MessagingException(string message, Exception innerException)
: base(message, innerException)
{
}
#if !SILVERLIGHT && !MONOTOUCH && !XBOX
protected MessagingException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
#endif
public virtual MessageError ToMessageError()
{
return new MessageError {
ErrorCode = GetType().Name,
Message = this.Message,
StackTrace = this.ToString(), //Also includes inner exception
};
}
}
}