forked from multiversx/mx-chain-vm-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexecutorError.go
27 lines (19 loc) · 1.02 KB
/
executorError.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package executor
import (
"errors"
"fmt"
)
// ErrInvalidFunction signals that the function is invalid
var ErrInvalidFunction = errors.New("invalid function")
// ErrFunctionNonvoidSignature signals that the signature for the function is invalid
var ErrFunctionNonvoidSignature = fmt.Errorf("%w (nonvoid signature)", ErrInvalidFunction)
// ErrFuncNotFound signals that the the function does not exist
var ErrFuncNotFound = fmt.Errorf("%w (not found)", ErrInvalidFunction)
// ErrMemoryBadBounds signals that a certain variable is out of bounds
var ErrMemoryBadBounds = errors.New("bad bounds")
// ErrMemoryBadBoundsLower signals that a certain variable is lower than allowed
var ErrMemoryBadBoundsLower = fmt.Errorf("%w (lower)", ErrMemoryBadBounds)
// ErrMemoryBadBoundsUpper signals that a certain variable is higher than allowed
var ErrMemoryBadBoundsUpper = fmt.Errorf("%w (upper)", ErrMemoryBadBounds)
// ErrMemoryNegativeLength signals that the given length is less than 0
var ErrMemoryNegativeLength = errors.New("negative length")