MCPcopy Index your code
hub / github.com/chain/Core / Error

Method Error

protocol/vm/vm.go:225–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223}
224
225func (e Error) Error() string {
226 dis, err := Disassemble(e.Prog)
227 if err != nil {
228 dis = "???"
229 }
230
231 args := make([]string, 0, len(e.Args))
232 for _, a := range e.Args {
233 args = append(args, hex.EncodeToString(a))
234 }
235
236 return fmt.Sprintf("%s [prog %x = %s; args %s]", e.Err.Error(), e.Prog, dis, strings.Join(args, " "))
237}
238
239func wrapErr(err error, vm *virtualMachine, args [][]byte) error {
240 if err == nil {

Callers 15

mainFunction · 0.45
rewriteConfigFunction · 0.45
NewListenerFunction · 0.45
triggerElectionFunction · 0.45
serveMsgMethod · 0.45
serveJoinMethod · 0.45
TestWriteIDFunction · 0.45
TestReadIDFunction · 0.45
TestReadIDErrorFunction · 0.45
NewChainFunction · 0.45
TestValidateBlockForSigFunction · 0.45
TestBadMaxIssuanceWindowFunction · 0.45

Calls 1

DisassembleFunction · 0.85

Tested by 15

TestWriteIDFunction · 0.36
TestReadIDFunction · 0.36
TestReadIDErrorFunction · 0.36
TestValidateBlockForSigFunction · 0.36
TestBadMaxIssuanceWindowFunction · 0.36
TestApplyTxSpendFunction · 0.36
TestDuplicateLeavesFunction · 0.36
TestAllDuplicateLeavesFunction · 0.36
TestMarshalBlockFunction · 0.36
TestVerifyBlockHeaderFunction · 0.36