blob: bb56b2f585fb1e8ad05e7239148998422812ae2e [file] [log] [blame]
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build fuchsia
package os
import (
"syscall/zx"
)
type syscallErrorType = *zx.Error
func wrapSyscallError(name string, err error) error {
if err, ok := err.(*zx.Error); ok {
text := name
if err.Text != "" {
text += ": " + err.Text
}
return &zx.Error{Status: err.Status, Text: text}
}
return err
}