~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Exceptions/ReportException.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Runtime.Serialization;
 
6
using System.Security.Permissions;
 
7
 
 
8
/// <summary>
 
9
/// This Class throws the Standart SharpReport Error
 
10
/// </summary>
 
11
/// <remarks>
 
12
///     created by - Forstmeier Peter
 
13
///     created on - 15.01.2005 09:39:32
 
14
/// </remarks>
 
15
/// 
 
16
namespace ICSharpCode.Reports.Core {
 
17
        [Serializable()]
 
18
        public class ReportException : Exception {
 
19
                
 
20
                
 
21
                string errorMessage = String.Empty;
 
22
                public ReportException():base(){
 
23
                        
 
24
                }
 
25
                public ReportException(string errorMessage) :base (errorMessage){
 
26
                        this.errorMessage = errorMessage;
 
27
                }
 
28
                public ReportException(string errorMessage,
 
29
                                            Exception exception):base (errorMessage,exception){
 
30
                        
 
31
                }
 
32
                
 
33
                protected ReportException(SerializationInfo info,
 
34
                                               StreamingContext context) : base(info, context){
 
35
                        // Implement type-specific serialization constructor logic.
 
36
                }
 
37
                
 
38
                public string ErrorMessage {
 
39
                        get {
 
40
                                return errorMessage;
 
41
                        }
 
42
                }
 
43
                
 
44
                [SecurityPermissionAttribute(SecurityAction.Demand,
 
45
                                             SerializationFormatter = true)]
 
46
 
 
47
                public override void GetObjectData(SerializationInfo info, StreamingContext context){
 
48
                        if (info == null) {
 
49
                                throw new ArgumentNullException("info");
 
50
                        }
 
51
                        info.AddValue("errorMessage", this.errorMessage);
 
52
                        base.GetObjectData(info, context);
 
53
                }
 
54
                
 
55
        }
 
56
}