Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FileNotFoundException.cs
Go to the documentation of this file.
3
4namespace System.IO;
5
7[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
9{
10 public override string Message
11 {
12 get
13 {
15 return _message;
16 }
17 }
18
19 public string? FileName { get; }
20
21 public string? FusionLog { get; }
22
24 : base(null)
25 {
29 }
30
32 : base(SR.IO_FileNotFound)
33 {
34 base.HResult = -2147024894;
35 }
36
37 public FileNotFoundException(string? message)
38 : base(message)
39 {
40 base.HResult = -2147024894;
41 }
42
44 : base(message, innerException)
45 {
46 base.HResult = -2147024894;
47 }
48
49 public FileNotFoundException(string? message, string? fileName)
50 : base(message)
51 {
52 base.HResult = -2147024894;
54 }
55
56 public FileNotFoundException(string? message, string? fileName, Exception? innerException)
57 : base(message, innerException)
58 {
59 base.HResult = -2147024894;
61 }
62
63 private void SetMessageField()
64 {
65 if (_message == null)
66 {
67 if (FileName == null && base.HResult == -2146233088)
68 {
70 }
71 else if (FileName != null)
72 {
74 }
75 }
76 }
77
78 public override string ToString()
79 {
80 string text = GetType().ToString() + ": " + Message;
81 if (!string.IsNullOrEmpty(FileName))
82 {
84 }
85 if (base.InnerException != null)
86 {
87 text = text + "\r\n ---> " + base.InnerException.ToString();
88 }
89 if (StackTrace != null)
90 {
91 text = text + "\r\n" + StackTrace;
92 }
93 if (FusionLog != null)
94 {
95 if (text == null)
96 {
97 text = " ";
98 }
99 text = text + "\r\n\r\n" + FusionLog;
100 }
101 return text;
102 }
103
105 : base(info, context)
106 {
107 FileName = info.GetString("FileNotFound_FileName");
108 FusionLog = info.GetString("FileNotFound_FusionLog");
109 }
110
112 {
113 base.GetObjectData(info, context);
114 info.AddValue("FileNotFound_FileName", FileName, typeof(string));
115 info.AddValue("FileNotFound_FusionLog", FusionLog, typeof(string));
116 }
117}
virtual ? string StackTrace
Definition Exception.cs:143
new Type GetType()
Definition Exception.cs:437
static string FormatFileLoadExceptionMessage(string fileName, int hResult)
FileNotFoundException(string? message, string? fileName)
FileNotFoundException(string? message, Exception? innerException)
override void GetObjectData(SerializationInfo info, StreamingContext context)
FileNotFoundException(string? message, string? fileName, Exception? innerException)
FileNotFoundException(string fileName, int hResult)
FileNotFoundException(SerializationInfo info, StreamingContext context)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string IO_FileName_Name
Definition SR.cs:1548
static string IO_FileNotFound
Definition SR.cs:38
Definition SR.cs:7
override string ToString()
Definition Type.cs:1108