Skip to content

Commit

Permalink
MalformedInputException not caught by log reading IOException
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis authored and sormuras committed Dec 17, 2023
1 parent 2a9d111 commit bb4ef1d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import de.sormuras.junit.platform.isolator.TestMode;
import java.io.File;
import java.io.IOException;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -152,11 +153,14 @@ int evaluate(Configuration configuration) {
mojo.warn("Reading output/error logs failed: {0}", e);
}
}
return exitValue;
} catch (CharacterCodingException cce) {
// Possibly thrown from Files.lines and not caught above
mojo.warn("Charset error reading output/error logs: {0}", cce);
} catch (IOException | InterruptedException e) {
mojo.error("Executing process failed: {0}", e);
return -1;
}
return exitValue;
}

// Supply standard options for Java foundation tool
Expand Down

0 comments on commit bb4ef1d

Please sign in to comment.