v0.0.620
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
This commit is contained in:
@@ -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,11 @@ 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package goext
|
package goext
|
||||||
|
|
||||||
const GoextVersion = "0.0.619"
|
const GoextVersion = "0.0.620"
|
||||||
|
|
||||||
const GoextVersionTimestamp = "2026-01-08T22:58:50+0100"
|
const GoextVersionTimestamp = "2026-01-08T23:03:55+0100"
|
||||||
|
|||||||
Reference in New Issue
Block a user