IKVM11
11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
FatalCompilerErrorException.cs
Go to the documentation of this file.
1
using
System
;
2
3
using
IKVM.CoreLib.Diagnostics
;
4
5
namespace
IKVM.Tools.Importer
6
{
7
8
sealed
class
FatalCompilerErrorException
: Exception
9
{
10
17
static
string
FormatDiagnosticLevel(
DiagnosticLevel
level)
18
{
19
return
level
switch
20
{
21
DiagnosticLevel.Trace =>
"trace"
,
22
DiagnosticLevel.Info =>
"info"
,
23
DiagnosticLevel.Warning =>
"warning"
,
24
DiagnosticLevel.Error =>
"error"
,
25
DiagnosticLevel.Fatal =>
"fatal"
,
26
_ =>
throw
new
InvalidOperationException(),
27
};
28
}
29
30
readonly
DiagnosticEvent
_event;
31
36
internal
FatalCompilerErrorException
(in
DiagnosticEvent
evt) :
37
#if NET8_0_OR_GREATER
38
base($
"{FormatDiagnosticLevel(evt.Diagnostic.Level)} IKVM{evt.Diagnostic.Id:D4}: {string.Format(null, evt.Diagnostic.Message, evt.Args)}"
)
39
#else
40
base($
"{FormatDiagnosticLevel(evt.Diagnostic.Level)} IKVM{evt.Diagnostic.Id:D4}: {string.Format(null, evt.Diagnostic.Message, evt.Args)}"
)
41
#endif
42
{
43
_event = evt;
44
}
45
49
public
DiagnosticEvent
Event
=> _event;
50
51
}
52
53
}
IKVM.Tools.Importer.FatalCompilerErrorException
Definition
FatalCompilerErrorException.cs:9
IKVM.Tools.Importer.FatalCompilerErrorException.Event
DiagnosticEvent Event
Gets the event that triggered this exception.
Definition
FatalCompilerErrorException.cs:49
IKVM.CoreLib.Diagnostics
Definition
Diagnostic.cs:4
IKVM.CoreLib.Diagnostics.DiagnosticLevel
DiagnosticLevel
Represents the level of security of a diagnostic event.
Definition
DiagnosticLevel.cs:7
IKVM.Tools.Importer
Definition
AssemblyResolver.cs:32
System
Definition
HexConverter.cs:9
IKVM.CoreLib.Diagnostics.DiagnosticEvent
Definition
DiagnosticEvent.g.cs:9
src
IKVM.Tools.Importer
FatalCompilerErrorException.cs
Generated by
1.12.0