Skip to content

Commit

Permalink
Hack out slow-to-compile exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
cies authored and cies committed Jan 13, 2023
1 parent 3466e6f commit a719b02
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/commonMain/kotlin/visit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ package kotlinx.html

inline fun <T : Tag> T.visitTag(block: T.() -> Unit) {
consumer.onTagStart(this)
try {
this.block()
} catch (err: Throwable) {
consumer.onTagError(this, err)
} finally {
consumer.onTagEnd(this)
}
this.block()
// removed the exception handling, hoping to speed up compilation of DSL code
consumer.onTagEnd(this)
}

inline fun <T : Tag, R> T.visitTagAndFinalize(consumer: TagConsumer<R>, block: T.() -> Unit): R {
Expand Down

0 comments on commit a719b02

Please sign in to comment.