wapc/wapc-go

context.guestErr not returned if guestCall is not error

Closed this issue · 1 comments

https://github.com/wapc/wapc-go/blob/master/module.go#L398
Sometimes we want to fetch the error inside the guest invocation, we cannot. GuestCall will only be error if the invoke command is not found or there is panic.

	if err != nil {

		return nil, errors.Wrap(err, "error invoking guest")
	}
	if context.guestErr != "" {
		return nil, errors.WithStack(errors.New(context.guestErr))
	}
pkedy commented

@alanpoon Thanks for reporting this! I released v0.3.2 with the fix.