Skip to content

Commit

Permalink
When using a formatted string, additional exception argument is ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalinowsky committed May 1, 2024
1 parent 8c8bcd0 commit a562dfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/io/calimero/tools/BaosClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.text.MessageFormat;
import java.time.Duration;
import java.time.Instant;
import java.time.LocalDate;
Expand Down Expand Up @@ -565,7 +566,7 @@ private void runRepl() throws IOException, InterruptedException {
out(e.getMessage());
}
catch (KNXException | RuntimeException e) {
out.log(ERROR, "[{0}]", line, e);
out.log(ERROR, MessageFormat.format("[{0}]", line), e);
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/io/calimero/tools/DeviceInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -887,7 +888,7 @@ private void readActualPeiType() throws InterruptedException
putResult(CommonParameter.ActualPeiType, toPeiTypeString(peitype), peitype);
}
catch (final KNXException e) {
out.log(ERROR, "reading actual PEI type (A/D converter channel {0}, repeat {1})", channel, repeat, e);
out.log(ERROR, MessageFormat.format("reading actual PEI type (A/D converter channel {0}, repeat {1})", channel, repeat), e);
}
}

Expand Down Expand Up @@ -1275,7 +1276,7 @@ private void read(final Parameter p, final Callable<String> c) throws KNXLinkClo
out.log(WARNING, "reading {0}: {1}", p, e.getMessage());
}
catch (final Exception e) {
out.log(ERROR, "error reading {0}", p, e);
out.log(ERROR, "error reading " + p, e);
}
}

Expand Down

0 comments on commit a562dfd

Please sign in to comment.