Skip to content

Commit f3e2453

Browse files
authored
Do not fail if config file does not exist (#136)
Signed-off-by: Pavol Loffay <[email protected]>
1 parent 1608fb9 commit f3e2453

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

javaagent-core/src/main/java/org/hypertrace/agent/core/HypertraceConfig.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ private static AgentConfig load() throws IOException {
107107
static AgentConfig load(String filename) throws IOException {
108108
File configFile = new File(filename);
109109
if (!configFile.exists() || configFile.isDirectory() || !configFile.canRead()) {
110-
throw new IllegalArgumentException(
111-
String.format("Config file %s either does not exist or cannot be read", configFile));
110+
log.error("Config file {} does not exist", filename);
111+
return AgentConfig.newBuilder().build();
112112
}
113113

114114
AgentConfig.Builder configBuilder = AgentConfig.newBuilder();

0 commit comments

Comments
 (0)