-
Couldn't load subscription status.
- Fork 5.2k
Tweaks to warning formatting #118797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Tweaks to warning formatting #118797
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -213,16 +213,18 @@ private void CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeN | |
|
|
||
| if (exception != null) | ||
| { | ||
| var mdOwningType = method.OwningType as MetadataType; | ||
| string owningAssembly = mdOwningType?.Module?.Assembly?.GetName()?.Name ?? "<unknown>"; | ||
|
||
| if (exception is TypeSystemException.InvalidProgramException | ||
| && method.OwningType is MetadataType mdOwningType | ||
| && mdOwningType != null | ||
| && mdOwningType.HasCustomAttribute("System.Runtime.InteropServices", "ClassInterfaceAttribute")) | ||
| { | ||
| Logger.LogWarning(method, DiagnosticId.COMInteropNotSupportedInFullAOT); | ||
| } | ||
| if ((_compilationOptions & RyuJitCompilationOptions.UseResilience) != 0) | ||
| Logger.LogMessage($"Method '{method}' will always throw because: {exception.Message}"); | ||
| else | ||
| Logger.LogError($"Method will always throw because: {exception.Message}", 1005, method, MessageSubCategory.AotAnalysis); | ||
| Logger.LogError($"Method in '{owningAssembly}' will always throw because: {exception.Message}", 1005, method, MessageSubCategory.AotAnalysis); | ||
|
|
||
| // Try to compile the method again, but with a throwing method body this time. | ||
| MethodIL throwingIL = TypeSystemThrowingILEmitter.EmitIL(method, exception); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.