Skip to content

Commit 8de841d

Browse files
committedFeb 22, 2023
8302667: Improve message format when failing to load symbols or libraries
Reviewed-by: mchung
1 parent f893d23 commit 8de841d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎src/java.base/share/native/libjli/args.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static JLI_List expandArgFile(const char *arg) {
379379

380380
/* error occurred reading the file */
381381
if (rv == NULL) {
382-
JLI_ReportMessage(DLL_ERROR4, arg);
382+
JLI_ReportMessage(ARG_ERROR18, arg);
383383
exit(1);
384384
}
385385
fclose(fptr);

‎src/java.base/share/native/libjli/emessages.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
#define ARG_ERROR15 "Error: Option %s is not allowed in this context"
5858
#define ARG_ERROR16 "Error: Option %s in %s is not allowed in this context"
5959
#define ARG_ERROR17 "Error: Cannot specify main class in this context"
60+
#define ARG_ERROR18 "Error: Failed to read %s"
6061

6162
#define JVM_ERROR1 "Error: Could not create the Java Virtual Machine.\n" GEN_ERROR
6263
#define JVM_ERROR2 "Error: Could not detach main thread.\n" JNI_ERROR
@@ -108,7 +109,7 @@
108109
#define DLL_ERROR1 "Error: dl failure on line %d"
109110
#define DLL_ERROR2 "Error: failed %s, because %s"
110111
#define DLL_ERROR3 "Error: could not find executable %s"
111-
#define DLL_ERROR4 "Error: loading: %s"
112+
#define DLL_ERROR4 "Error: Failed to load %s"
112113

113114
#define REG_ERROR1 "Error: opening registry key '%s'"
114115
#define REG_ERROR2 "Error: Failed reading value of registry key:\n\t%s\\CurrentVersion"

0 commit comments

Comments
 (0)
Please sign in to comment.