Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 78 for Oops (0.17 sec)

  1. docs_src/dependencies/tutorial008c.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney ๐Ÿ˜ฑ")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 660 bytes
    - Viewed (0)
  2. docs_src/dependencies/tutorial008c_an_py39.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney ๐Ÿ˜ฑ")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 700 bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial008c_an.py

    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney ๐Ÿ˜ฑ")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 710 bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/SingletonImmutableSet.java

    @ElementTypesAreNonnullByDefault
    final class SingletonImmutableSet<E> extends ImmutableSet<E> {
      // We deliberately avoid caching the asList and hashCode here, to ensure that with
      // compressed oops, a SingletonImmutableSet packs all the way down to the optimal 16 bytes.
    
      final transient E element;
    
      SingletonImmutableSet(E element) {
        this.element = Preconditions.checkNotNull(element);
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/SingletonImmutableSet.java

    @ElementTypesAreNonnullByDefault
    final class SingletonImmutableSet<E> extends ImmutableSet<E> {
      // We deliberately avoid caching the asList and hashCode here, to ensure that with
      // compressed oops, a SingletonImmutableSet packs all the way down to the optimal 16 bytes.
    
      final transient E element;
    
      SingletonImmutableSet(E element) {
        this.element = Preconditions.checkNotNull(element);
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

        protected BadFuture(ListenableFuture<Integer> delegate) {
          super(delegate);
        }
    
        @Override
        public Integer get() {
          throw new RuntimeException("Oops");
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

        protected BadFuture(ListenableFuture<Integer> delegate) {
          super(delegate);
        }
    
        @Override
        public Integer get() {
          throw new RuntimeException("Oops");
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  8. cmd/erasure-healing-common_test.go

    					f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_SYNC, 0)
    					if err != nil {
    						t.Fatalf("Failed to open %s: %s\n", filePath, err)
    					}
    					f.WriteString("oops") // Will cause bitrot error
    					f.Close()
    					break
    				}
    
    			}
    
    			rQuorum := len(errs) - z.serverPools[0].sets[0].defaultParityCount
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 15:19:10 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

         * throws a RuntimeException when retrieving the nth element.
         *
         * If the PeekingIterator is caching elements too aggressively,
         * it may throw the exception on the (n-1)th element (oops!).
         */
    
        /* Checks the case where the first element throws an exception. */
    
        List<Integer> list = emptyList();
        Iterator<Integer> iterator = peekingIterator(new ThrowsAtEndIterator<Integer>(list));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/handling-errors.md

    ```
    
    ๐Ÿ“ฅ, ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ“จ `/unicorns/yolo`, *โžก ๐Ÿ› ๏ธ* ๐Ÿ”œ `raise` `UnicornException`.
    
    โœ‹๏ธ โšซ๏ธ ๐Ÿ”œ ๐Ÿต `unicorn_exception_handler`.
    
    , ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ“จ ๐Ÿงน โŒ, โฎ๏ธ ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ” ๐Ÿ‘” ๐Ÿ“Ÿ `418` &amp; ๐ŸŽป ๐ŸŽš:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    /// note | "๐Ÿ“ก โ„น"
    
    ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `from starlette.requests import Request` &amp; `from starlette.responses import JSONResponse`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.3K bytes
    - Viewed (0)
Back to top