|
|
@ -40,9 +40,9 @@ internal static class AvaloniaXamlDiagnosticCodes |
|
|
// Reserved 5000-9998
|
|
|
// Reserved 5000-9998
|
|
|
public const string Obsolete = "AVLN5001"; |
|
|
public const string Obsolete = "AVLN5001"; |
|
|
|
|
|
|
|
|
internal static string XamlXDiagnosticCodeToAvalonia(object xamlException) |
|
|
internal static string XamlXDiagnosticCodeToAvalonia(object codeOrException) |
|
|
{ |
|
|
{ |
|
|
return xamlException switch |
|
|
return codeOrException switch |
|
|
{ |
|
|
{ |
|
|
XamlXWellKnownDiagnosticCodes wellKnownDiagnosticCodes => wellKnownDiagnosticCodes switch |
|
|
XamlXWellKnownDiagnosticCodes wellKnownDiagnosticCodes => wellKnownDiagnosticCodes switch |
|
|
{ |
|
|
{ |
|
|
@ -50,6 +50,9 @@ internal static class AvaloniaXamlDiagnosticCodes |
|
|
_ => throw new ArgumentOutOfRangeException() |
|
|
_ => throw new ArgumentOutOfRangeException() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// ExperimentalAttribute reports its own code
|
|
|
|
|
|
string code => code, |
|
|
|
|
|
|
|
|
XamlDataContextException => DataContextResolvingError, |
|
|
XamlDataContextException => DataContextResolvingError, |
|
|
XamlBindingsTransformException => BindingsError, |
|
|
XamlBindingsTransformException => BindingsError, |
|
|
XamlPropertyPathException => PropertyPathError, |
|
|
XamlPropertyPathException => PropertyPathError, |
|
|
|