mirror of
https://github.com/ordinary-dev/phoenix
synced 2024-09-20 03:40:29 +05:00
15 lines
285 B
Go
15 lines
285 B
Go
package views
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/ordinary-dev/phoenix/config"
|
|
"net/http"
|
|
)
|
|
|
|
func ShowError(ctx *gin.Context, cfg *config.Config, err error) {
|
|
Render(ctx, cfg, http.StatusBadRequest, "error.html.tmpl", gin.H{
|
|
"error": err.Error(),
|
|
})
|
|
ctx.Abort()
|
|
}
|