Skip to content

Commit 5500162

Browse files
Change timeout handling to throw IOException
Throw IOException on command timeout instead of printing message.
1 parent b43b8fe commit 5500162

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/mycmd/commands/AssocCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void execute(String[] args, ShellContext context) throws IOException {
7575

7676
if (!finished) {
7777
process.destroyForcibly();
78-
System.out.println("Command timed out.");
78+
throw new IOException("Command timed out after 30 seconds");
7979
}
8080

8181
try {

0 commit comments

Comments
 (0)