Skip to content

Commit e0ddf1d

Browse files
committed
refactor(compiler): replace AutoDevNotifications with logger in FileInsCommand
Replace AutoDevNotifications.warn with logger.warn for consistency and better logging practices
1 parent 52a0b89 commit e0ddf1d

File tree

1 file changed

+3
-1
lines changed
  • exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec

1 file changed

+3
-1
lines changed

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec/FileInsCommand.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cc.unitmesh.devti.language.compiler.exec
22

3+
import cc.unitmesh.devti.AutoDevNotifications
34
import cc.unitmesh.devti.devin.InsCommand
45
import cc.unitmesh.devti.devin.InsCommandListener
56
import cc.unitmesh.devti.devin.InsCommandStatus
@@ -32,7 +33,8 @@ class FileInsCommand(private val myProject: Project, private val prop: String) :
3233

3334
val contentsToByteArray = virtualFile?.contentsToByteArray()
3435
if (contentsToByteArray == null) {
35-
logger.warn("File not found: $virtualFile")
36+
AutoDevNotifications.warn(myProject, "File not found: $virtualFile")
37+
throw IllegalArgumentException("File not found: $virtualFile")
3638
return null
3739
}
3840

0 commit comments

Comments
 (0)