Skip to content

Commit 8e756d7

Browse files
committed
fix(compiler): throw exception for missing file
Throw `IllegalArgumentException` when a file is not found, ensuring proper error handling and preventing null returns
1 parent b0e756f commit 8e756d7

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ class FileInsCommand(private val myProject: Project, private val prop: String) :
3333

3434
val contentsToByteArray = virtualFile?.contentsToByteArray()
3535
if (contentsToByteArray == null) {
36-
AutoDevNotifications.warn(myProject, "File not found: $virtualFile")
37-
throw IllegalArgumentException("File not found: $virtualFile")
36+
AutoDevNotifications.warn(myProject, "File not found: $prop")
3837
return null
3938
}
4039

0 commit comments

Comments
 (0)