[#539] Add context to errors
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
e1f1e6d960
commit
7ca519cb32
26 changed files with 111 additions and 102 deletions
|
@ -1,6 +1,9 @@
|
|||
package handler
|
||||
|
||||
import "encoding/xml"
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// ListBucketsResponse -- format for list buckets response.
|
||||
type ListBucketsResponse struct {
|
||||
|
@ -207,7 +210,7 @@ func (s StringMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
|
|||
|
||||
for _, t := range tokens {
|
||||
if err := e.EncodeToken(t); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("encode token: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue