fserror.go 789 B

1234567891011121314151617181920212223242526272829
  1. package fserror
  2. /*
  3. fserror.go
  4. This package handle error related to file systems.
  5. See comments below for usage.
  6. */
  7. import "errors"
  8. var (
  9. //Redirective Error
  10. ErrRedirectParent = errors.New("Redirect:parent")
  11. ErrRedirectCurrentRoot = errors.New("Redirect:root")
  12. ErrRedirectUserRoot = errors.New("Redirect:userroot")
  13. //Resolve errors
  14. ErrVpathResolveFailed = errors.New("FS_VPATH_RESOLVE_FAILED")
  15. ErrRpathResolveFailed = errors.New("FS_RPATH_RESOLVE_FAILED")
  16. ErrFSHNotFOund = errors.New("FS_FILESYSTEM_HANDLER_NOT_FOUND")
  17. //Operation errors
  18. ErrOperationNotSupported = errors.New("FS_OPR_NOT_SUPPORTED")
  19. ErrNullOperation = errors.New("FS_NULL_OPR")
  20. )
  21. func NewRedirectionError(targetVpath string) error {
  22. return errors.New("Redirect:" + targetVpath)
  23. }