21 lines
382 B
Go
21 lines
382 B
Go
package handler
|
|
|
|
import (
|
|
"cybertron/service"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type ExceptionHandler struct {
|
|
exceptionService *service.ExceptionService
|
|
}
|
|
|
|
func (h *ExceptionHandler) CatchErrors(c *gin.Context) {
|
|
h.exceptionService.CatchErrors(c)
|
|
}
|
|
|
|
func NewExceptionHandler(es *service.ExceptionService) *ExceptionHandler {
|
|
return &ExceptionHandler{
|
|
exceptionService: es,
|
|
}
|
|
}
|