Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of about 10,000 for Errorf (0.42 sec)

  1. internal/crypto/error.go

    func Errorf(format string, a ...interface{}) error {
    	e := fmt.Errorf(format, a...)
    	ee := Error{}
    	ee.msg = e.Error()
    	ee.cause = errors.Unwrap(e)
    	return ee
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.cause }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.msg == "" {
    		return "crypto: cause <nil>"
    	}
    	return e.msg
    }
    
    var (
    Registered: 2024-06-16 00:44
    - Last Modified: 2024-03-28 17:44
    - 4.4K bytes
    - Viewed (0)
  2. security/pkg/pki/error/error_test.go

    			eType:   -1,
    			err:     fmt.Errorf("test error5"),
    			message: "UNKNOWN",
    			code:    codes.Internal,
    		},
    	}
    
    	for k, tc := range testCases {
    		caErr := NewError(tc.eType, tc.err)
    		if caErr.Error() != tc.err.Error() {
    			t.Errorf("[%s] unexpected error: '%s' VS (expected)'%s'", k, caErr.Error(), tc.err.Error())
    		}
    		if caErr.ErrorType() != tc.message {
    Registered: 2024-06-14 15:00
    - Last Modified: 2020-05-29 20:42
    - 2K bytes
    - Viewed (0)
  3. src/encoding/gob/error.go

    type gobError struct {
    	err error
    }
    
    // errorf is like error_ but takes Printf-style arguments to construct an error.
    // It always prefixes the message with "gob: ".
    func errorf(format string, args ...any) {
    	error_(fmt.Errorf("gob: "+format, args...))
    }
    
    // error_ wraps the argument error and uses it as the argument to panic.
    func error_(err error) {
    	panic(gobError{err})
    Registered: 2024-06-12 16:32
    - Last Modified: 2022-09-30 23:03
    - 1.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/mergepatch/errors.go

    	}
    	return fmt.Errorf("expected a %s, but received a %s", expectedKindString, actualKindString)
    }
    
    func ErrBadPatchType(t interface{}, m map[string]interface{}) error {
    	return fmt.Errorf("unknown patch type: %s in map: %v", t, m)
    }
    
    // IsPreconditionFailed returns true if the provided error indicates
    // a precondition failed.
    func IsPreconditionFailed(err error) bool {
    	_, ok := err.(ErrPreconditionFailed)
    Registered: 2024-06-15 01:39
    - Last Modified: 2017-11-01 13:12
    - 3.1K bytes
    - Viewed (0)
  5. pkg/kubelet/checkpointmanager/errors/errors.go

    limitations under the License.
    */
    
    package errors
    
    import "fmt"
    
    // ErrCorruptCheckpoint error is reported when checksum does not match
    var ErrCorruptCheckpoint = fmt.Errorf("checkpoint is corrupted")
    
    // ErrCheckpointNotFound is reported when checkpoint is not found for a given key
    Registered: 2024-06-15 01:39
    - Last Modified: 2018-04-16 05:30
    - 886 bytes
    - Viewed (0)
  6. operator/pkg/util/errs_test.go

    		t.Errorf("got: %s, want: %s", got, want)
    	}
    }
    
    func TestAppendErrsInFunction(t *testing.T) {
    	myAppendErrFunc := func() (errs Errors) {
    		errs = AppendErr(errs, fmt.Errorf("err1"))
    		errs = AppendErr(errs, fmt.Errorf("err2"))
    		return
    	}
    	if got, want := myAppendErrFunc().String(), wantStr; got != want {
    		t.Errorf("got: %s, want: %s", got, want)
    	}
    
    	myAppendErrsFunc := func() (errs Errors) {
    Registered: 2024-06-14 15:00
    - Last Modified: 2020-05-29 20:42
    - 3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/util/errors/errors_test.go

    			nil,
    		},
    		{
    			aggregate{fmt.Errorf("abc")},
    			aggregate{fmt.Errorf("abc")},
    		},
    		{
    			aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")},
    			aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")},
    		},
    		{
    			aggregate{aggregate{fmt.Errorf("abc")}},
    			aggregate{fmt.Errorf("abc")},
    		},
    		{
    			aggregate{aggregate{aggregate{fmt.Errorf("abc")}}},
    			aggregate{fmt.Errorf("abc")},
    Registered: 2024-06-15 01:39
    - Last Modified: 2022-07-24 13:16
    - 12.7K bytes
    - Viewed (0)
  8. internal/bucket/replication/error.go

    package replication
    
    import (
    	"fmt"
    )
    
    // Error is the generic type for any error happening during tag
    // parsing.
    type Error struct {
    	err error
    }
    
    // Errorf - formats according to a format specifier and returns
    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    Registered: 2024-06-16 00:44
    - Last Modified: 2021-06-01 21:59
    - 1.3K bytes
    - Viewed (0)
  9. internal/bucket/lifecycle/error.go

    package lifecycle
    
    import (
    	"fmt"
    )
    
    // Error is the generic type for any error happening during tag
    // parsing.
    type Error struct {
    	err error
    }
    
    // Errorf - formats according to a format specifier and returns
    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    Registered: 2024-06-16 00:44
    - Last Modified: 2021-06-01 21:59
    - 1.3K bytes
    - Viewed (0)
  10. internal/bucket/versioning/error.go

    package versioning
    
    import (
    	"fmt"
    )
    
    // Error is the generic type for any error happening during tag
    // parsing.
    type Error struct {
    	err error
    }
    
    // Errorf - formats according to a format specifier and returns
    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    Registered: 2024-06-16 00:44
    - Last Modified: 2021-06-01 21:59
    - 1.3K bytes
    - Viewed (0)
Back to top