Replies: 1 comment 1 reply
-
Hi :) While that would be possible, the aim here is to reproduce normal behaviour of the I also can't think of any use case for catching exceptions here, I mean you can easily make sure your replaced resources work, just by testing your app. If this is something you need though, you could implement it relatively easily by just checking your strings for the correct number of arguments before adding them to restring, and adding a backup for those were the number of arguments are wrong. Does this help you? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
we have a question regarding the possible exceptions that might occur when calling String.format:
If the resource strings and the possibly necessary associated format arguments are combined in the ResourcesDelegate#getString or ResourcesDelegate#getQuantityString methods, exceptions of String.format cannot be precluded. This may involve, for example, the number of format arguments or their type.
Wouldn't it be a good idea to catch the exceptions there and return, for example, the unformatted string from the repository? Wouldn't that be more robust?
André
Beta Was this translation helpful? Give feedback.
All reactions