Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,161 for exceptions (0.28 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 14 07:19:09 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 14 07:19:09 GMT 2024
    - Last Modified: Tue Jan 09 16:30:58 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 14 07:19:09 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 14 07:19:09 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/testing/ClusterException.java

      final Collection<? extends Throwable> exceptions;
    
      private ClusterException(Collection<? extends Throwable> exceptions) {
        super(
            exceptions.size() + " exceptions were thrown. The first exception is listed as a cause.",
            exceptions.iterator().next());
        ArrayList<? extends Throwable> temp = new ArrayList<>(exceptions);
        this.exceptions = Collections.unmodifiableCollection(temp);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 4K bytes
    - Viewed (0)
  6. maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java

        // Exceptions
        // ------------------------------------------------------------------------
    
        public boolean hasExceptions() {
            return exceptions != null && !exceptions.isEmpty();
        }
    
        public List<Exception> getExceptions() {
            return exceptions == null ? Collections.emptyList() : Collections.unmodifiableList(exceptions);
        }
    
    Java
    - Registered: Sun Apr 14 03:35:08 GMT 2024
    - Last Modified: Wed Sep 06 11:28:54 GMT 2023
    - 9.3K bytes
    - Viewed (0)
  7. fastapi/exception_handlers.py

    from fastapi.encoders import jsonable_encoder
    from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError
    from fastapi.utils import is_body_allowed_for_status_code
    from fastapi.websockets import WebSocket
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.responses import JSONResponse, Response
    from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION
    
    
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  8. 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 14 03:35:08 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/ClusterException.java

      final Collection<? extends Throwable> exceptions;
    
      private ClusterException(Collection<? extends Throwable> exceptions) {
        super(
            exceptions.size() + " exceptions were thrown. The first exception is listed as a cause.",
            exceptions.iterator().next());
        ArrayList<? extends Throwable> temp = new ArrayList<>(exceptions);
        this.exceptions = Collections.unmodifiableCollection(temp);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 4K bytes
    - Viewed (0)
  10. 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 14 07:19:09 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
Back to top