- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for MyError (0.09 sec)
-
src/runtime/chanbarrier_test.go
) type response struct { } type myError struct { } func (myError) Error() string { return "" } func doRequest(useSelect bool) (*response, error) { type async struct { resp *response err error } ch := make(chan *async, 0) done := make(chan struct{}, 0) if useSelect { go func() { select { case ch <- &async{resp: nil, err: myError{}}: case <-done: } }() } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 17:50:18 UTC 2024 - 1.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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 17:13:04 UTC 2024 - 4.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
ListenableFuture<Object> input = UncheckedThrowingFuture.throwingError(new MyError()); // We'd catch only MyError.class here, but then the test won't compile under GWT. ListenableFuture<Object> output = catching(input, Throwable.class, identity(), directExecutor()); assertThat(getDone(output)).isInstanceOf(MyError.class); } public void testCatching_listenerThrowsError() throws Exception {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed May 29 16:29:37 UTC 2024 - 144.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
ListenableFuture<Object> input = UncheckedThrowingFuture.throwingError(new MyError()); // We'd catch only MyError.class here, but then the test won't compile under GWT. ListenableFuture<Object> output = catching(input, Throwable.class, identity(), directExecutor()); assertThat(getDone(output)).isInstanceOf(MyError.class); } public void testCatching_listenerThrowsError() throws Exception {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed May 29 16:29:37 UTC 2024 - 144.1K bytes - Viewed (0) -
src/text/template/exec_test.go
v := make([]int, len(b)) for i, x := range b { v[i] = x + a } return v } var myError = errors.New("my error") // MyError returns a value and an error according to its argument. func (t *T) MyError(error bool) (bool, error) { if error { return true, myError } return false, nil } // A few methods to test chaining. func (t *T) GetU() *U { return t.U }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 22:23:55 UTC 2024 - 60.1K bytes - Viewed (0)