summaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorArnie97 <arnie97@gmail.com>2021-07-31 14:20:29 +0800
committerGitHub <noreply@github.com>2021-07-31 14:20:29 +0800
commiteaf9781e7e51d5aacf238c9cb39a249097abed33 (patch)
tree9deb351e064afe201ac6882fea071b0a76e0ca52 /errors.go
parent7ac37edfebebc9bee201fad001e2f2f8b780a9a8 (diff)
Improve compatibility for SetRichText (#976)
- support escaped string literal - maximum character limit added - fix missing preserve character in some case Co-authored-by: xuri <xuri.me@gmail.com>
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/errors.go b/errors.go
index 6b32563..0edb697 100644
--- a/errors.go
+++ b/errors.go
@@ -45,7 +45,7 @@ var (
ErrColumnNumber = errors.New("column number exceeds maximum limit")
// ErrColumnWidth defined the error message on receive an invalid column
// width.
- ErrColumnWidth = errors.New("the width of the column must be smaller than or equal to 255 characters")
+ ErrColumnWidth = fmt.Errorf("the width of the column must be smaller than or equal to %d characters", MaxColumnWidth)
// ErrOutlineLevel defined the error message on receive an invalid outline
// level number.
ErrOutlineLevel = errors.New("invalid outline level")
@@ -111,4 +111,7 @@ var (
// ErrDataValidationRange defined the error message on set decimal range
// exceeds limit.
ErrDataValidationRange = errors.New("data validation range exceeds limit")
+ // ErrCellCharsLength defined the error message for receiving a cell
+ // characters length that exceeds the limit.
+ ErrCellCharsLength = fmt.Errorf("cell value must be 0-%d characters", TotalCellChars)
)