github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/execution/errors/native.go (about)

     1  package errors
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/hyperledger/burrow/crypto"
     7  )
     8  
     9  type LacksNativePermission struct {
    10  	Address    crypto.Address
    11  	NativeName string
    12  }
    13  
    14  var _ CodedError = &LacksNativePermission{}
    15  
    16  func (e *LacksNativePermission) ErrorMessage() string {
    17  	return fmt.Sprintf("account %s does not have native function call permission: %s", e.Address, e.NativeName)
    18  }
    19  
    20  func (e *LacksNativePermission) Error() string {
    21  	return e.ErrorMessage()
    22  }
    23  
    24  func (e *LacksNativePermission) ErrorCode() *Code {
    25  	return Codes.NativeFunction
    26  }