Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XslTransformException.cs
Go to the documentation of this file.
3using System.Text;
4
5namespace System.Xml.Xsl;
6
8{
9 public XslTransformException(Exception inner, string res, params string[] args)
10 : base(CreateMessage(res, args), inner)
11 {
12 }
13
15 : base(info, context)
16 {
17 }
18
19 public XslTransformException(string message)
20 : base(CreateMessage(message, (string[])null), null)
21 {
22 }
23
24 internal XslTransformException(string res, params string[] args)
25 : this(null, res, args)
26 {
27 }
28
29 internal static string CreateMessage(string res, params string[] args)
30 {
31 string text = null;
32 try
33 {
34 if (args == null)
35 {
36 text = res;
37 }
38 else
39 {
40 text = string.Format(res, args);
41 }
42 }
44 {
45 }
46 if (text != null)
47 {
48 return text;
49 }
51 if (args != null && args.Length != 0)
52 {
53 stringBuilder.Append('(');
54 stringBuilder.Append(args[0]);
55 for (int i = 1; i < args.Length; i++)
56 {
57 stringBuilder.Append(", ");
58 stringBuilder.Append(args[i]);
59 }
60 stringBuilder.Append(')');
61 }
62 return stringBuilder.ToString();
63 }
64
65 internal virtual string FormatDetailedMessage()
66 {
67 return Message;
68 }
69
70 public override string ToString()
71 {
72 string text = GetType().FullName;
74 if (text2 != null && text2.Length > 0)
75 {
76 text = text + ": " + text2;
77 }
78 if (base.InnerException != null)
79 {
80 text = text + " ---> " + base.InnerException.ToString() + Environment.NewLine + " " + CreateMessage(System.SR.Xml_EndOfInnerExceptionStack);
81 }
82 if (StackTrace != null)
83 {
85 }
86 return text;
87 }
88}
virtual ? string StackTrace
Definition Exception.cs:143
new Type GetType()
Definition Exception.cs:437
static string Xml_EndOfInnerExceptionStack
Definition SR.cs:1826
Definition SR.cs:7
string? FullName
Definition Type.cs:47
XslTransformException(SerializationInfo info, StreamingContext context)
static string CreateMessage(string res, params string[] args)
XslTransformException(Exception inner, string res, params string[] args)
XslTransformException(string res, params string[] args)