Skip to content

Commit

Permalink
feat: print error stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Oct 20, 2024
1 parent 2de7ccd commit c81ef11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn_mappings=1.21.1+build.3
loader_version=0.16.7
kotlin_loader_version=1.12.3+kotlin.2.0.21
# Mod Properties
mod_version=1.3.1
mod_version=1.3.2
maven_group=net.mcbrawls
mod_id=inject
# Dependencies
Expand Down
6 changes: 4 additions & 2 deletions src/main/kotlin/net/mcbrawls/inject/http/HttpInjector.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ abstract class HttpInjector : Injector() {
ctx.writeAndFlush(response.inner)
.addListener(ChannelFutureListener.CLOSE)
.addListener { future ->
if (future.isSuccess) {
val cause = future.cause()
if (cause == null) {
logger.debug("Write successful")
} else {
logger.error("Write failed: ${future.cause()}")
logger.error("Write failed: $cause")
cause.printStackTrace()
}
}

Expand Down

0 comments on commit c81ef11

Please sign in to comment.