RFR: 8302667: Improve message format when failing to load symbols or libraries [v3]

Mandy Chung mchung at openjdk.org
Wed Feb 22 17:00:49 UTC 2023


On Tue, 21 Feb 2023 17:14:57 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> DLL_ERROR4 is a macro expanding to an error message when a failure to load a generic item (shared libraries or an exported symbol from said libraries for example) occurs. "Error: loading:" is not a very pretty message, so this small change results in "Error: Failed to load %s" instead, which looks better and also means the message makes more sense if we want to append a reason behind as well, such as "Error: Failed to load libjvm.so because xxx"
>
> Julian Waters has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - expandArgFile
>  - ARG_ERROR18

Thanks in making the change.

src/java.base/share/native/libjli/emessages.h line 60:

> 58: #define ARG_ERROR16     "Error: Option %s in %s is not allowed in this context"
> 59: #define ARG_ERROR17     "Error: Cannot specify main class in this context"
> 60: #define ARG_ERROR18     "Error: Could not read %s"

Suggestion:

#define ARG_ERROR18     "Error: Failed to read %s"

-------------

Marked as reviewed by mchung (Reviewer).

PR: https://git.openjdk.org/jdk/pull/12596


More information about the core-libs-dev mailing list