Skip to content

Commit 378f9b0

Browse files
committed
v2.1.2: Updated func (e *E) Error() string implementation to handle nil pointer references.
1 parent 60b02fc commit 378f9b0

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
- **Minor**: feature additions, removal of deprecated features
77
- **Patch**: bug fixes, backward compatible model and function changes, etc.
88

9+
# v2.1.2 - 2021-05-12
10+
#### Added
11+
* n/a
12+
13+
#### Changed
14+
* Updated `func (e *E) Error() string` implementation to handle nil pointer references.
15+
16+
#### Removed
17+
* n/a
18+
919
# v2.1.1 - 2020-05-30
1020
#### Added
1121
* n/a

error.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ func (e *E) Caller() std_caller.Caller {
2525

2626
// Error implements std_error.Error.
2727
func (e *E) Error() string {
28+
if nil == e.err {
29+
return ""
30+
}
2831
return e.err.Error()
2932
}
3033

0 commit comments

Comments
 (0)