We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bce53e commit 0cd223fCopy full SHA for 0cd223f
core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/patch/SingleFileDiffSketch.kt
@@ -58,7 +58,12 @@ class SingleFileDiffSketch(
58
private val myHeaderPanel: JPanel = JPanel(BorderLayout())
59
private var patchActionPanel: JPanel? = null
60
private val oldCode = if (currentFile.isValid && currentFile.exists()) {
61
- currentFile.readText()
+ try {
62
+ currentFile.readText()
63
+ } catch (e: IOException) {
64
+ logger<SingleFileDiffSketch>().warn("Failed to read file: ${currentFile.path}", e)
65
+ ""
66
+ }
67
} else ""
68
69
private var appliedPatch = try {
0 commit comments