Uh oh!
There was an error while loading. Please reload this page.
Mono: Replace exception strings with those stored in the resx file (#34056) - #78341
Conversation
ghost
commented
Nov 14, 2022
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
AaronRobinsonMSFT
commented
Nov 14, 2022
vargaz
commented
Nov 14, 2022
Looks ok to me. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fixed 2nd parameter for argumentExceptions
jkoritzinsky
commented
Nov 14, 2022
Can we switch all of the |
Uh oh!
There was an error while loading. Please reload this page.
Is this just in the path: |
jkoritzinsky
commented
Nov 15, 2022
Yeah only within your change. |
string.format -> SR.Format
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jkotas
left a comment
There was a problem hiding this comment.
There seems to be a lot of opportunities in de-duplicating the new error strings with the existing error strings. I have commented on some, but there is certainly more.
The easy way to do the deduplication is to build a small program that hits the error path, run it on CoreCLR and see what error it produces in that case.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Would a way to do it be like: have a script which iterates through all of the exception strings in the .resx file If true dont remove, else remove?? and ill make a backup just in case then run the build see if theres any missing references |
jkotas
commented
Nov 21, 2022
I do not think you can script it. The error messages are not exactly the same. You need to be looking for same meaning that can be only done by humans (or AI). |
databunks
commented
Nov 23, 2022
ok thanks ill look into it |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Not related to this change, but I see some ApplicationException and base Exception getting thrown, which we generally don't throw, does CLR throw the same in these cases? |
akoeplinger
commented
Mar 20, 2023
No, we should clean those up at some point. You'd expect the same exception being thrown, regardless of runtime implementation. |
akoeplinger
commented
Mar 20, 2023
Regarding the CLA, it looks like some issue with the new CLA system since it was signed in the old system according to #78341 (comment) and the status on one of the earlier commits: I'll try to find someone who can look into that. |
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Dan Moseley <danmose@microsoft.com>
@databunks
Edit: we were able to update the new system instead so this is handled now. |
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts: # src/mono/System.Private.CoreLib/src/Mono/RuntimeMarshal.cs
| FieldInfo fi = internal_from_handle_type(handle.Value, declaringType.Value); | ||
| if (fi == null) | ||
| throw new ArgumentException("The field handle and the type handle are incompatible."); | ||
| throw new ArgumentException(SR.Argument_FieldPropertyEventAndTypeHandleIncompatibility); |
There was a problem hiding this comment.
Can this be Argument_ResolveFieldHandle like in CoreCLR?
There was a problem hiding this comment.
Theoretically yes but I don't have the type(s) to fill in the format string and RuntimeFieldHandle.GetApproxDeclaringType is only implemented in CoreCLR.
I'd rather keep this as is for now so we can finally get this PR in.

Fixes#34056