Skip to content

Commit

Permalink
update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing committed Nov 27, 2024
1 parent d50ddb7 commit 10d4b9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fvm/evm/offchain/storage/readonly.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package storage

import (
"errors"
"fmt"

"github.com/onflow/atree"

Expand Down Expand Up @@ -29,7 +29,7 @@ func (s *ReadOnlyStorage) GetValue(owner []byte, key []byte) ([]byte, error) {

// SetValue returns an error if called
func (s *ReadOnlyStorage) SetValue(owner, key, value []byte) error {
return errors.New("unexpected call received")
return fmt.Errorf("unexpected call received for SetValue with owner: %x, key: %v, value: %x", owner, key, value)
}

// ValueExists checks if a register exists
Expand All @@ -40,5 +40,5 @@ func (s *ReadOnlyStorage) ValueExists(owner []byte, key []byte) (bool, error) {

// AllocateSlabIndex returns an error if called
func (s *ReadOnlyStorage) AllocateSlabIndex(owner []byte) (atree.SlabIndex, error) {
return atree.SlabIndex{}, errors.New("unexpected call received")
return atree.SlabIndex{}, fmt.Errorf("unexpected call received for AllocateSlabIndex with owner: %x", owner)
}

0 comments on commit 10d4b9d

Please sign in to comment.