Skip to content

Commit

Permalink
Fix warning (#2260)
Browse files Browse the repository at this point in the history
* Fix warning

* Add missing file
  • Loading branch information
soywiz authored Jul 3, 2024
1 parent 83c337b commit 7e9c02a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class TypedResourcesGenerator {
return normalizeName().textCase().camelCase()
}

fun generateForFolders(resourcesFolder: SFile): String {
fun generateForFolders(resourcesFolder: SFile, reporter: (e: Throwable, message: String) -> Unit = { e, message ->
System.err.println(message)
e.printStackTrace()
}): String {
return Indenter {
line("import korlibs.audio.sound.*")
line("import korlibs.io.file.*")
Expand Down Expand Up @@ -146,8 +149,7 @@ class TypedResourcesGenerator {
val info = try {
ASEInfo.getAseInfo(ase.file.readBytes())
} catch (e: Throwable) {
System.err.println("ERROR LOADING FILE: aseFile=$aseFile")
e.printStackTrace()
reporter(e, "ERROR LOADING FILE: aseFile=$aseFile")
ASEInfo()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class TypedResourcesGeneratorTest {
"images/image.ase" to "",
"images/image2.ase" to "INVALID213123123621639172639127637216",
)
)
) { e, message ->

}

fun String.normalize(): String {
return this.trimIndent().replace("\t", " ").trim().lines().map { it.trimEnd() }.joinToString("\n")
Expand Down

0 comments on commit 7e9c02a

Please sign in to comment.