Skip to content

Commit

Permalink
Updated error message
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Oct 26, 2022
1 parent f3fc6fc commit 57661e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ var invalidDurationError = func(duration string) error {
// returns an invalid value error.
// 无效的时间字符串错误
var invalidValueError = func(value string) error {
return fmt.Errorf("cannot parse %q as carbon, please make sure the value is valid", value)
return fmt.Errorf("cannot parse string %q as carbon, please make sure the value is valid", value)
}

// returns an invalid layout error.
// 无效的布局模板错误
var invalidLayoutError = func(value, layout string) error {
return fmt.Errorf("cannot parse %q as carbon by layout %q, please make sure the value and layout match", value, layout)
return fmt.Errorf("cannot parse string %q as carbon by layout %q, please make sure the value and layout match", value, layout)
}

// returns an invalid format error.
// 无效的格式模板错误
var invalidFormatError = func(value, format string) error {
return fmt.Errorf("cannot parse %q as carbon by format %q, please make sure the value and format match", value, format)
return fmt.Errorf("cannot parse string %q as carbon by format %q, please make sure the value and format match", value, format)
}

0 comments on commit 57661e4

Please sign in to comment.