~ubuntu-branches/ubuntu/trusty/smuxi/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/ServiceStack/src/ServiceStack.Interfaces/Messaging/MessagingException.cs

  • Committer: Package Import Robot
  • Author(s): Mirco Bauer
  • Date: 2013-05-25 22:11:31 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20130525221131-nd2mc0kzubuwyx20
Tags: 0.8.11-1
* [22d13d5] Imported Upstream version 0.8.11
* [6d2b95a] Refreshed patches
* [89eb66e] Added ServiceStack libraries to smuxi-engine package
* [848ab10] Enable Campfire engine
* [c6dbdc7] Always build db4o for predictable build result
* [13ec489] Exclude OS X specific libraries from dh_clideps

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using System;
 
2
using System.Runtime.Serialization;
 
3
 
 
4
namespace ServiceStack.Messaging
 
5
{
 
6
        /// <summary>
 
7
        /// Base Exception for all ServiceStack.Messaging exceptions
 
8
        /// </summary>
 
9
        public class MessagingException
 
10
                : Exception
 
11
        {
 
12
                public MessagingException()
 
13
                {
 
14
                }
 
15
 
 
16
                public MessagingException(string message)
 
17
                        : base(message)
 
18
                {
 
19
                }
 
20
 
 
21
                public MessagingException(string message, Exception innerException)
 
22
                        : base(message, innerException)
 
23
                {
 
24
                }
 
25
 
 
26
#if !SILVERLIGHT && !MONOTOUCH && !XBOX
 
27
                protected MessagingException(SerializationInfo info, StreamingContext context)
 
28
                        : base(info, context)
 
29
                {
 
30
                }
 
31
#endif
 
32
        public virtual MessageError ToMessageError()
 
33
                {
 
34
                        return new MessageError {
 
35
                                ErrorCode = GetType().Name,
 
36
                                Message = this.Message,
 
37
                                StackTrace = this.ToString(), //Also includes inner exception
 
38
                        };
 
39
                }
 
40
        }
 
41
}