18 lines
278 B
Go
18 lines
278 B
Go
package common
|
|
|
|
type BusinessException struct {
|
|
Message string
|
|
Code int
|
|
}
|
|
|
|
func (e *BusinessException) Error() string {
|
|
return e.Message
|
|
}
|
|
|
|
func NewBusinessException(message string) *BusinessException {
|
|
return &BusinessException{
|
|
Message: message,
|
|
Code: 400,
|
|
}
|
|
}
|