mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-29 18:57:37 +08:00
unified error tips
This commit is contained in:
parent
0f0d190dbc
commit
7b8ded9b1e
@ -16,15 +16,15 @@ var invalidDurationError = func(duration string) error {
|
||||
|
||||
// 无效的时间字符串错误
|
||||
var invalidValueError = func(value string) error {
|
||||
return fmt.Errorf("cannot parse %q to carbon, please make sure the value is valid", value)
|
||||
return fmt.Errorf("cannot parse %q as carbon, please make sure the value is valid", value)
|
||||
}
|
||||
|
||||
// 无效的布局模板错误
|
||||
var invalidLayoutError = func(value, layout string) error {
|
||||
return fmt.Errorf("cannot parse %q as layout %q to carbon, please make sure the value and layout match", value, layout)
|
||||
return fmt.Errorf("cannot parse %q as carbon by layout %q, please make sure the value and layout match", value, layout)
|
||||
}
|
||||
|
||||
// 无效的格式化字符错误
|
||||
var invalidFormatError = func(value, format string) error {
|
||||
return fmt.Errorf("cannot parse %q as format %q to carbon, please make sure the value and format match", value, format)
|
||||
return fmt.Errorf("cannot parse %q as carbon by format %q, please make sure the value and format match", value, format)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user