From: Lanius Trolling Date: Fri, 15 Mar 2024 18:48:08 +0000 (-0400) Subject: Re-add exception logging code but properly this time X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=c5a76e6ce0dbef321bc0bdfc55e749e25d50a2d7;p=factbooks Re-add exception logging code but properly this time --- diff --git a/src/jvmMain/kotlin/info/mechyrdia/lore/fonts.kt b/src/jvmMain/kotlin/info/mechyrdia/lore/fonts.kt index 9fc8daa..336676c 100644 --- a/src/jvmMain/kotlin/info/mechyrdia/lore/fonts.kt +++ b/src/jvmMain/kotlin/info/mechyrdia/lore/fonts.kt @@ -4,7 +4,9 @@ import com.jaredrummler.fontreader.truetype.FontFileReader import com.jaredrummler.fontreader.truetype.TTFFile import com.jaredrummler.fontreader.util.GlyphSequence import info.mechyrdia.Configuration +import info.mechyrdia.application import info.mechyrdia.yieldThread +import io.ktor.server.application.* import io.ktor.util.* import java.awt.Font import java.awt.Shape @@ -217,6 +219,9 @@ object MechyrdiaSansFont { } return shape + } catch (ex: Exception) { + application.log.error("Error converting text $text to font shape", ex) + return GeneralPath() } finally { g2d.dispose() }