Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 121 - 130 of 405 for excepciones (0.06 seconds)

  1. okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt

          )
        val responseB = client.newCall(requestB).execute()
        assertThat(responseB.body.string()).isEqualTo("b")
        assertThat(server.takeRequest().exchangeIndex).isEqualTo(0)
      }
    
      /** Confirm suppressed exceptions that occur while connecting are returned. */
      @Test fun connectExceptionsAreReturnedAsSuppressed() {
        val proxySelector = RecordingProxySelector()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Jun 20 11:46:46 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  2. docs/zh/docs/tutorial/handling-errors.md

    一般情况下你可能不会在代码中直接使用它。
    
    但在某些高级场景中需要时,你可以添加自定义响应头:
    
    {* ../../docs_src/handling_errors/tutorial002_py310.py hl[14] *}
    
    ## 安装自定义异常处理器 { #install-custom-exception-handlers }
    
    可以使用[与 Starlette 相同的异常处理工具](https://www.starlette.dev/exceptions/)添加自定义异常处理器。
    
    假设有一个自定义异常 `UnicornException`(你自己或你使用的库可能会 `raise` 它)。
    
    并且你希望用 FastAPI 在全局处理该异常。
    
    此时,可以用 `@app.exception_handler()` 添加自定义异常处理器:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 8.2K bytes
    - Click Count (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

       * features to support (from the enclosing {@link AbstractIteratorTester} instance). Instead of
       * throwing exceptions like {@link NoSuchElementException} at the appropriate times, it throws
       * {@link PermittedMetaException} instances, which wrap a set of all exceptions that the iterator
       * could throw during the invocation of that method. This is necessary because, e.g., a call to
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 20.8K bytes
    - Click Count (0)
  4. tests/test_exception_handlers.py

    import pytest
    from fastapi import Depends, FastAPI, HTTPException
    from fastapi.exceptions import RequestValidationError
    from fastapi.testclient import TestClient
    from starlette.responses import JSONResponse
    
    
    def http_exception_handler(request, exception):
        return JSONResponse({"exception": "http-exception"})
    
    
    def request_validation_exception_handler(request, exception):
        return JSONResponse({"exception": "request-validation"})
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Dec 03 22:37:12 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  5. tests/test_pydantic_v1_error.py

    import sys
    import warnings
    
    import pytest
    
    from tests.utils import skip_module_if_py_gte_314
    
    if sys.version_info >= (3, 14):
        skip_module_if_py_gte_314()
    
    from fastapi import FastAPI
    from fastapi.exceptions import PydanticV1NotSupportedError
    
    with warnings.catch_warnings():
        warnings.simplefilter("ignore", UserWarning)
        from pydantic.v1 import BaseModel
    
    
    def test_raises_pydantic_v1_model_in_endpoint_param() -> None:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 2.3K bytes
    - Click Count (0)
  6. tests/test_deprecated_responses.py

    import warnings
    
    import pytest
    from fastapi import FastAPI
    from fastapi.exceptions import FastAPIDeprecationWarning
    from fastapi.responses import ORJSONResponse, UJSONResponse
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    # ORJSON
    
    
    def _make_orjson_app() -> FastAPI:
        with warnings.catch_warnings():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 22 16:34:59 GMT 2026
    - 2K bytes
    - Click Count (0)
  7. src/main/java/jcifs/smb/SmbAuthException.java

    package jcifs.smb;
    
    /**
     * The <code>SmbAuthException</code> encapsulates the variety of
     * authentication related error codes returned by an SMB server.
     * <p>
     * See <a href="../../../authhandler.html">jCIFS Exceptions and NtlmAuthenticator</a> for more information about
     * <code>SmbAuthException</code>.
     */
    
    public class SmbAuthException extends SmbException {
    
        /**
         *
         */
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 1.5K bytes
    - Click Count (0)
  8. guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

       * features to support (from the enclosing {@link AbstractIteratorTester} instance). Instead of
       * throwing exceptions like {@link NoSuchElementException} at the appropriate times, it throws
       * {@link PermittedMetaException} instances, which wrap a set of all exceptions that the iterator
       * could throw during the invocation of that method. This is necessary because, e.g., a call to
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 21.4K bytes
    - Click Count (0)
  9. .teamcity/src/test/kotlin/CIConfigIntegrationTests.kt

                assertTrue(projectDirsWithUnitTests.contains(it), "Contains unit tests: $it")
            }
        }
    
        private fun containsSrcFileWithString(
            srcRoot: File,
            content: String,
            exceptions: List<String>,
        ): Boolean {
            srcRoot.walkTopDown().forEach { file ->
                if (file.extension == "groovy" || file.extension == "java") {
                    val originalText = file.readText()
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Thu Oct 16 01:27:05 GMT 2025
    - 14.6K bytes
    - Click Count (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt

     * or response.
     *
     * Implementations of this interface throw [IOException] to signal connectivity failures. This
     * includes both natural exceptions such as unreachable servers, as well as synthetic exceptions
     * when responses are of an unexpected type or cannot be decoded.
     *
     * Other exception types cancel the current call:
     *
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 8.9K bytes
    - Click Count (0)
Back to Top