Compare commits

...

2 Commits

Author SHA1 Message Date
a032d09ea2 v0.0.621
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m34s
2026-01-08 23:04:46 +01:00
4bebc9ea38 v0.0.620
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
2026-01-08 23:03:55 +01:00
2 changed files with 11 additions and 4 deletions

View File

@@ -3,7 +3,6 @@ package ginext
import ( import (
"fmt" "fmt"
"net/http" "net/http"
"strings"
"git.blackforestbytes.com/BlackForestBytes/goext/exerr" "git.blackforestbytes.com/BlackForestBytes/goext/exerr"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@@ -42,6 +41,8 @@ func Wrap(w *GinWrapper, fn WHandlerFunc) gin.HandlerFunc {
} }
if g.Writer.Written() { if g.Writer.Written() {
// (!) This panic is not preoperly cached - it will kill the whole process
// but that only means you should NOT write in WrapperFunc...
panic("Writing in WrapperFunc is not supported") panic("Writing in WrapperFunc is not supported")
} }
@@ -64,7 +65,13 @@ func Wrap(w *GinWrapper, fn WHandlerFunc) gin.HandlerFunc {
wrap.Write(g) wrap.Write(g)
if g.IsAborted() { if g.IsAborted() {
// can happen if we try to marshal an invalid json object (e.g. containing Inf) // can happen if we try to marshal an invalid json object (e.g. containing Inf)
panic("Failed to write response to renderer:\n" + strings.Join(g.Errors.Errors(), "\n")) exerr.
New(exerr.TypePanic, "Failed to write response to renderer").
Strs("errors", g.Errors.Errors()).
Stack().
Print(g)
g.Status(500)
} }
} }
} }

View File

@@ -1,5 +1,5 @@
package goext package goext
const GoextVersion = "0.0.619" const GoextVersion = "0.0.621"
const GoextVersionTimestamp = "2026-01-08T22:58:50+0100" const GoextVersionTimestamp = "2026-01-08T23:04:46+0100"