14 lines
256 B
Go
14 lines
256 B
Go
package handler
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
"sh.org.ru/pkg/tpl"
|
|
)
|
|
|
|
func ErrorHandler(err error, c echo.Context) {
|
|
if err := tpl.ErrorPage(err.Error()).Render(c.Request().Context(), c.Response()); err != nil {
|
|
log.Println(err)
|
|
}
|
|
}
|