Add FATAL diagnostic severity to match changes in the current script infrastructure
This commit is contained in:
@@ -13,7 +13,7 @@ data class ScriptDiagnostic(
|
||||
val location: ScriptSource.Location? = null,
|
||||
val exception: Throwable? = null
|
||||
) {
|
||||
enum class Severity { ERROR, WARNING, INFO, DEBUG }
|
||||
enum class Severity { FATAL, ERROR, WARNING, INFO, DEBUG }
|
||||
}
|
||||
|
||||
sealed class ResultWithDiagnostics<out R> {
|
||||
|
||||
@@ -21,6 +21,7 @@ fun mapLegacyDiagnosticSeverity(severity: ScriptDependenciesResolver.ReportSever
|
||||
}
|
||||
|
||||
fun mapToLegacyScriptReportSeverity(severity: ScriptDiagnostic.Severity): ScriptReport.Severity = when (severity) {
|
||||
ScriptDiagnostic.Severity.FATAL -> ScriptReport.Severity.FATAL
|
||||
ScriptDiagnostic.Severity.ERROR -> ScriptReport.Severity.ERROR
|
||||
ScriptDiagnostic.Severity.WARNING -> ScriptReport.Severity.WARNING
|
||||
ScriptDiagnostic.Severity.INFO -> ScriptReport.Severity.INFO
|
||||
|
||||
Reference in New Issue
Block a user