1234567891011121314151617181920212223242526272829303132 |
- package taxerr
- import "fmt"
- // NewBankSystemError 创建银行任务系统异常
- func NewBankSystemError(bank, reason, operation string) error {
- return &SystemErr{
- Msg: fmt.Sprintf("[异常]: [%s] %s [操作]: %s", bank, reason, operation),
- }
- }
- // NewBankUserError 创建银行任务用户错误
- func NewBankUserError(bank, reason, operation string) error {
- return &UserErr{
- Msg: fmt.Sprintf("[错误]: [%s] %s [操作]: %s", bank, reason, operation),
- }
- }
- // 创建没有银行账户错误
- func NewErrNoAccount(bank string) error {
- return NewBankUserError(bank, "网银无银行账户", "请手动登录网银确认账户是否正常")
- }
- // 创建银行主账号不存在错误
- func NewErrAccountNotFound(bank string) error {
- return NewBankUserError(bank, "指定的银行主账号不存在", "请核实后再发起采集")
- }
- // 创建银行账户匹配失败错误
- func NewErrAccMismatch(bank string) error {
- return NewBankUserError(bank, "银行账户匹配失败", "请联系运维人员处理")
- }
|