Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Error.cs
Go to the documentation of this file.
1
using
System.Runtime.InteropServices
;
2
3
namespace
System.IO
;
4
5
internal
static
class
Error
6
{
7
internal
static
Exception
GetExceptionForLastWin32DriveError
(
string
driveName)
8
{
9
int
lastPInvokeError =
Marshal
.
GetLastPInvokeError
();
10
return
GetExceptionForWin32DriveError
(lastPInvokeError, driveName);
11
}
12
13
internal
static
Exception
GetExceptionForWin32DriveError
(
int
errorCode,
string
driveName)
14
{
15
if
(errorCode == 3 || errorCode == 15)
16
{
17
return
new
DriveNotFoundException
(
System
.
SR
.
Format
(
System
.
SR
.
IO_DriveNotFound_Drive
, driveName));
18
}
19
return
System
.
IO
.
Win32Marshal
.
GetExceptionForWin32Error
(errorCode, driveName);
20
}
21
}
System.Exception
Definition
Exception.cs:15
System.IO.DriveNotFoundException
Definition
DriveNotFoundException.cs:9
System.IO.Error.GetExceptionForLastWin32DriveError
static Exception GetExceptionForLastWin32DriveError(string driveName)
Definition
Error.cs:7
System.IO.Error.GetExceptionForWin32DriveError
static Exception GetExceptionForWin32DriveError(int errorCode, string driveName)
Definition
Error.cs:13
System.IO.Win32Marshal.GetExceptionForWin32Error
static Exception GetExceptionForWin32Error(int errorCode, string path="")
Definition
Win32Marshal.cs:5
System.IO.Win32Marshal
Definition
Win32Marshal.cs:4
System.Runtime.InteropServices.Marshal.GetLastPInvokeError
static int GetLastPInvokeError()
System.Runtime.InteropServices.Marshal
Definition
Marshal.cs:14
System.SR.Format
static string Format(string resourceFormat, object p1)
Definition
SR.cs:118
System.SR.IO_DriveNotFound_Drive
static string IO_DriveNotFound_Drive
Definition
SR.cs:22
System.SR
Definition
SR.cs:7
System.IO
Definition
ConsoleStream.cs:3
System.Runtime.InteropServices.UnmanagedType.Error
@ Error
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System
Definition
BlockingCollection.cs:8
source
System.IO.FileSystem.DriveInfo
System.IO
Error.cs
Generated by
1.10.0