Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,088 for exceptions (0.19 sec)

  1. docs/de/docs/reference/exceptions.md

    # Exceptions – `HTTPException` und `WebSocketException`
    
    Dies sind die <abbr title="Exception – Ausnahme, Fehler: Python-Objekt, das einen Fehler nebst Metadaten repräsentiert">Exceptions</abbr>, die Sie auslösen können, um dem Client Fehler zu berichten.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:16:53 GMT 2024
    - 797 bytes
    - Viewed (0)
  2. docs/en/docs/reference/exceptions.md

    # Exceptions - `HTTPException` and `WebSocketException`
    
    These are the exceptions that you can raise to show errors to the client.
    
    When you raise an exception, as would happen with normal Python, the rest of the execution is aborted. This way you can raise these exceptions from anywhere in the code to abort a request and show the error to the client.
    
    You can use:
    
    * `HTTPException`
    * `WebSocketException`
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 597 bytes
    - Viewed (0)
  3. fastapi/exceptions.py

    from pydantic import BaseModel, create_model
    from starlette.exceptions import HTTPException as StarletteHTTPException
    from starlette.exceptions import WebSocketException as StarletteWebSocketException
    from typing_extensions import Annotated, Doc
    
    
    class HTTPException(StarletteHTTPException):
        """
        An HTTP exception you can raise in your own code to show errors to the client.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  4. tests/test_dependency_normal_exceptions.py

    def reset_state_and_db():
        global fake_database
        global state
        fake_database = initial_fake_database.copy()
        state = initial_state.copy()
    
    
    client = TestClient(app)
    
    
    def test_dependency_gets_exception():
        assert state["except"] is False
        assert state["finally"] is False
        response = client.put("/invalid-user/rick", json="Morty")
        assert response.status_code == 400, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  5. maven-api-impl/src/main/java/org/apache/maven/internal/impl/DefaultDependencyResolverResult.java

         *
         * @param exceptions the exceptions that occurred while building the dependency graph
         * @param root the root node of the dependency graph
         * @param count estimated number of dependencies
         */
        DefaultDependencyResolverResult(List<Exception> exceptions, Node root, int count) {
            this.exceptions = exceptions;
            this.root = root;
            nodes = new ArrayList<>(count);
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

        ```
    
    An alternative you could use to catch exceptions (and possibly also raise another `HTTPException`) is to create a [Custom Exception Handler](../handling-errors.md#install-custom-exception-handlers){.internal-link target=_blank}.
    
    ## Dependencies with `yield` and `except`
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/Closer.java

     *       will be thrown.
     *   <li>If no exceptions or errors were thrown in the try block, the <i>first</i> exception thrown
     *       by an attempt to close a resource will be thrown.
     *   <li>Any exception caught when attempting to close a resource that is <i>not</i> thrown (because
     *       another exception is already being thrown) is <i>suppressed</i>.
     * </ul>
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  8. maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyResolverResult.java

         *
         * @param exceptions the exceptions that occurred while building the dependency graph
         * @param root the root node of the dependency graph
         * @param count estimated number of dependencies
         */
        DefaultDependencyResolverResult(List<Exception> exceptions, Node root, int count) {
            this.exceptions = exceptions;
            this.root = root;
            nodes = new ArrayList<>(count);
    Java
    - Registered: Sun Mar 24 03:35:10 GMT 2024
    - Last Modified: Fri Mar 01 17:18:13 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/handling-errors.md

    ```
    
    ## Install custom exception handlers
    
    You can add custom exception handlers with <a href="https://www.starlette.io/exceptions/" class="external-link" target="_blank">the same exception utilities from Starlette</a>.
    
    Let's say you have a custom exception `UnicornException` that you (or a library you use) might `raise`.
    
    And you want to handle this exception globally with FastAPI.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceEntryTester.java

          // the operation would be a no-op, so exceptions are allowed but not required
        }
        expectUnchanged();
      }
    
      @MapFeature.Require(absent = SUPPORTS_PUT)
      public void testReplaceEntry_unsupportedAbsentKey() {
        try {
          getMap().replace(k3(), v3(), v4());
        } catch (UnsupportedOperationException tolerated) {
          // the operation would be a no-op, so exceptions are allowed but not required
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
Back to top