Skip to content

Commit

Permalink
Wrap NoSuchFileException
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Jul 21, 2024
1 parent 6f8e3a8 commit 6b47adf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/commonMain/kotlin/teksturepako/pakku/io/ReadPath.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import kotlin.io.path.readText
private fun Throwable.toActionError(path: Path): ActionError = when (this)
{
is FileAlreadyExistsException -> AlreadyExists(path.toString())
is NoSuchFileException -> FileNotFound(path.toString())
else -> ErrorWhileReading(path.toString(), this.stackTraceToString())
}

Expand Down

0 comments on commit 6b47adf

Please sign in to comment.