Skip to content

Commit

Permalink
Clean up error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
05nelsonm committed Feb 9, 2024
1 parent f2208ad commit a30f633
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public abstract class Process internal constructor(
if (command.isBlank()) throw IOException("command cannot be blank")
command.toFile().let { cmd ->
if (!cmd.isAbsolute()) return@let
if (!cmd.exists()) throw FileNotFoundException("$cmd")
if (!cmd.exists()) throw FileNotFoundException("command: $cmd")
}

val stdio = stdio.build()
Expand All @@ -304,7 +304,7 @@ public abstract class Process internal constructor(
if (it.file == STDIO_NULL) return@forEach

if (isInput) {
if (!it.file.exists()) throw FileNotFoundException("stdin: $it")
if (!it.file.exists()) throw FileNotFoundException("stdin: ${it.file}")
return@forEach
}

Expand All @@ -314,7 +314,7 @@ public abstract class Process internal constructor(
?: return@forEach

if (!parent.exists() && !parent.mkdirs()) {
throw IOException("Failed to mkdirs for $parent")
throw IOException("Failed to mkdirs for $it")
}
}

Expand Down

0 comments on commit a30f633

Please sign in to comment.