- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 24 for errList (0.24 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/errors/errors.go
// It will check if any of the element of input error list is nil, to avoid // nil pointer panic when call Error(). func NewAggregate(errlist []error) Aggregate { if len(errlist) == 0 { return nil } // In case of input error list contains nil var errs []error for _, e := range errlist { if e != nil { errs = append(errs, e) } } if len(errs) == 0 { return nil } return aggregate(errs) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jan 29 09:44:02 UTC 2023 - 6.3K bytes - Viewed (0) -
operator/pkg/controller/istiocontrolplane/errdict.go
John Howard <******@****.***> 1714485406 -0700
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 30 13:56:46 UTC 2024 - 4.7K bytes - Viewed (0) -
src/os/error_test.go
{&os.SyscallError{Err: fs.ErrExist}, true, false}, {nil, false, false}, } func TestIsExist(t *testing.T) { for _, tt := range isExistTests { if is := os.IsExist(tt.err); is != tt.is { t.Errorf("os.IsExist(%T %v) = %v, want %v", tt.err, tt.err, is, tt.is) } if is := errors.Is(tt.err, fs.ErrExist); is != tt.is { t.Errorf("errors.Is(%T %v, fs.ErrExist) = %v, want %v", tt.err, tt.err, is, tt.is) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 19 00:41:52 UTC 2023 - 4.9K bytes - Viewed (0) -
src/cmd/asm/internal/asm/pseudo_test.go
} for _, o := range strings.Split(s, ",") { res = append(res, lex.Tokenize(o)) } return res } func TestErroneous(t *testing.T) { type errtest struct { pseudo string operands string expected string } nonRuntimeTests := []errtest{ {"TEXT", "", "expect two or three operands for TEXT"}, {"TEXT", "%", "expect two or three operands for TEXT"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 29 07:48:38 UTC 2023 - 3.1K bytes - Viewed (0) -
src/errors/errors.go
// matches the second. It reports whether it finds a match. It should be // used in preference to simple equality checks: // // if errors.Is(err, fs.ErrExist) // // is preferable to // // if err == fs.ErrExist // // because the former will succeed if err wraps [io/fs.ErrExist]. // // [As] examines the tree of its first argument looking for an error that can be
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 19:45:41 UTC 2023 - 2.9K bytes - Viewed (0) -
src/os/error.go
// that a file or directory already exists. It is satisfied by [ErrExist] as // well as some syscall errors. // // This function predates [errors.Is]. It only supports errors returned by // the os package. New code should use errors.Is(err, fs.ErrExist). func IsExist(err error) bool { return underlyingErrorIs(err, ErrExist) } // IsNotExist returns a boolean indicating whether the error is known to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:12 UTC 2024 - 4.8K bytes - Viewed (0) -
src/os/tempfile.go
f, err := OpenFile(name, O_RDWR|O_CREATE|O_EXCL, 0600) if IsExist(err) { if try++; try < 10000 { continue } return nil, &PathError{Op: "createtemp", Path: prefix + "*" + suffix, Err: ErrExist} } return f, err } } var errPatternHasSeparator = errors.New("pattern contains path separator") // prefixAndSuffix splits pattern by the last wildcard "*", if applicable,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 12 18:04:39 UTC 2024 - 3.9K bytes - Viewed (0) -
src/io/fs/fs.go
ErrExist = errExist() // "file already exists" ErrNotExist = errNotExist() // "file does not exist" ErrClosed = errClosed() // "file already closed" ) func errInvalid() error { return oserror.ErrInvalid } func errPermission() error { return oserror.ErrPermission } func errExist() error { return oserror.ErrExist }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 15 21:21:41 UTC 2024 - 9.4K bytes - Viewed (0) -
src/errors/wrap.go
// // An error type might provide an Is method so it can be treated as equivalent // to an existing error. For example, if MyError defines // // func (m MyError) Is(target error) bool { return target == fs.ErrExist } // // then Is(MyError{}, fs.ErrExist) returns true. See [syscall.Errno.Is] for // an example in the standard library. An Is method should only shallowly // compare err and the target and not call [Unwrap] on either.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 17:13:04 UTC 2024 - 4.3K bytes - Viewed (0) -
src/strconv/strconv_test.go
})) } func TestErrorPrefixes(t *testing.T) { _, errInt := Atoi("INVALID") _, errBool := ParseBool("INVALID") _, errFloat := ParseFloat("INVALID", 64) _, errInt64 := ParseInt("INVALID", 10, 64) _, errUint64 := ParseUint("INVALID", 10, 64) vectors := []struct { err error // Input error want string // Function name wanted }{ {errInt, "Atoi"}, {errBool, "ParseBool"}, {errFloat, "ParseFloat"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 20:29:22 UTC 2022 - 4.7K bytes - Viewed (0)