mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 15:15:45 +07:00
IDEA-345136 Improve error handling
GitOrigin-RevId: 644d1ad6be0cc60ef87dcc3cb0f262518761c157
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5d73e6ebe9
commit
299afb0617
@@ -101,8 +101,9 @@ class DefaultTemplate(val name: String,
|
||||
|
||||
if (text == null) {
|
||||
logger<DefaultTemplate>().error("Cannot find file by path: $fullPath")
|
||||
return "Unexpected error occurred"
|
||||
}
|
||||
return text ?: ""
|
||||
return text
|
||||
}
|
||||
|
||||
// the only external usage - https://github.com/wrdv/testme-idea/blob/8e314aea969619f43f0c6bb17f53f1d95b1072be/src/main/java/com/weirddev/testme/intellij/ui/template/FTManager.java#L200
|
||||
|
||||
@@ -342,8 +342,9 @@ private fun getLocalizedContent(path: String, pathResolver: Function<String, Str
|
||||
val result = pathResolver.apply(fullPath.invariantSeparatorsPathString)
|
||||
if (result == null) {
|
||||
logger<FileTemplatesLoader>().error("Cannot find file by path: $path")
|
||||
return "Unexpected error occurred"
|
||||
}
|
||||
return result ?: ""
|
||||
return result
|
||||
}
|
||||
|
||||
private fun loadFileContent(root: Path, filePath: String): String? {
|
||||
|
||||
Reference in New Issue
Block a user