Turns out one of those pesky todos came back to haunt me, go figure. The panic was due to how we resolve filesystem errors to error codes for syscalls. indexedfs helper calls were returning generic syscall/js.Error errors which we couldn't properly resolve in jsutil.go:ToJSError(), causing a panic in the os package which expected to find an error code.
I fixed this by explicitly stating which Go error to return when erroring in the JS helper. I also finished the mv command and did some other cleanup.
Closes #79
Turns out one of those pesky
todo
s came back to haunt me, go figure. The panic was due to how we resolve filesystem errors to error codes for syscalls.indexedfs
helper calls were returning genericsyscall/js.Error
errors which we couldn't properly resolve injsutil.go:ToJSError()
, causing a panic in theos
package which expected to find an error code.I fixed this by explicitly stating which Go error to return when erroring in the JS helper. I also finished the
mv
command and did some other cleanup.