ScriptStack 1.0.4
Loading...
Searching...
No Matches
ScriptStackException.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Text;
4
6{
7
8 public class ScriptStackException : Exception
9 {
10
11 #region Private Variables
12
13 private string message;
14 private Exception innerException;
15
16 #endregion
17
18 #region Public Methods
19
21 {
22
23 message = "Keine weiteren Details.";
24
25 innerException = null;
26
27 }
28
29 public ScriptStackException(string message)
30 {
31
32 this.message = message;
33
34 innerException = null;
35
36 }
37
38 public ScriptStackException(string message, Exception innerException)
39 {
40 this.message = message;
41 this.innerException = innerException;
42 }
43
44 public override string ToString()
45 {
46 return MessageTrace;
47 }
48
49 #endregion
50
51 #region Public Properties
52
53 public new string Message
54 {
55 get { return message; }
56 }
57
58 public string MessageTrace
59 {
60
61 get
62 {
63
64 if (innerException != null)
65 {
66
67 string messageTrace = message + "\nFehlerquelle: ";
68
69 if (typeof(ScriptStackException).IsAssignableFrom(innerException.GetType()))
70 messageTrace += ((ScriptStackException) innerException).MessageTrace;
71
72 else
73 messageTrace += innerException.Message;
74
75 return
76 messageTrace;
77
78 }
79
80 else
81 return message;
82
83 }
84
85 }
86
87 #endregion
88
89 }
90
91}
ScriptStackException(string message, Exception innerException)