Skip to content

Commit

Permalink
new: add _lasterror function
Browse files Browse the repository at this point in the history
Signed-off-by: Gaukas Wang <[email protected]>
  • Loading branch information
gaukas committed Jul 23, 2024
1 parent 215cb02 commit 815b16f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tinygo/v1/exports.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ func _start() uint32 {
return worker()
}

//export watm_lasterror_v1
func _lasterror() uint32 {
return uint32(lastError)
}

func saveAndReturnError(err error) uint32 {
syscallErrno, ok := err.(syscall.Errno)
if !ok {
Expand Down

0 comments on commit 815b16f

Please sign in to comment.