Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GlobalExceptionInterceptor ¶
GlobalExceptionInterceptor gin global exception interceptor add via gin middleware. an error of -10400 is thrown when the exception type is string and the BusinessException
func OrThrowBusiness ¶ added in v2.2.1
func OrThrowBusiness(err error)
OrThrowBusiness If err not nil, a business-level exception is thrown.
Types ¶
type BusinessException ¶
type BusinessException struct {
// contains filtered or unexported fields
}
BusinessException the service level exception, the service code is -10400, equivalent to resp.BadRequest
Click to show internal directories.
Click to hide internal directories.