File tree Expand file tree Collapse file tree
src/main/java/com/github/stickerifier/stickerify/process Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import org .slf4j .event .Level ;
88
99import java .io .IOException ;
10+ import java .io .UncheckedIOException ;
1011import java .util .StringJoiner ;
1112import java .util .concurrent .Semaphore ;
1213import java .util .concurrent .TimeUnit ;
@@ -40,17 +41,17 @@ public static String executeCommand(final String... command) throws ProcessExcep
4041 var outputThread = Thread .ofVirtual ().start (() -> {
4142 try (var reader = process .inputReader (UTF_8 )) {
4243 reader .lines ().forEach (standardOutput ::add );
43- } catch (IOException e ) {
44- LOGGER .at (Level .ERROR ).setCause (e ).log ("Error while closing process output reader" );
44+ } catch (IOException | UncheckedIOException e ) {
45+ LOGGER .at (Level .ERROR ).setCause (e ).log ("An error occurred using process output reader" );
4546 }
4647 });
4748
4849 var standardError = new StringJoiner ("\n " );
4950 var errorThread = Thread .ofVirtual ().start (() -> {
5051 try (var reader = process .errorReader (UTF_8 )) {
5152 reader .lines ().forEach (standardError ::add );
52- } catch (IOException e ) {
53- LOGGER .at (Level .ERROR ).setCause (e ).log ("Error while closing process error reader" );
53+ } catch (IOException | UncheckedIOException e ) {
54+ LOGGER .at (Level .ERROR ).setCause (e ).log ("An error occurred using process error reader" );
5455 }
5556 });
5657
You can’t perform that action at this time.
0 commit comments