Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 141 - 150 of 212 for raise (0.03 seconds)

  1. docs/zh-hant/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    你可以使用與平常相同的依賴函式。
    
    ### 依賴的需求 { #dependency-requirements }
    
    它們可以宣告請求需求(例如標頭(headers))或其他子依賴:
    
    {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[8,13] *}
    
    ### 拋出例外 { #raise-exceptions }
    
    這些依賴可以 `raise` 例外,與一般依賴相同:
    
    {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[10,15] *}
    
    ### 回傳值 { #return-values }
    
    它們可以回傳值,也可以不回傳;無論如何,回傳值都不會被使用。
    
    因此,你可以重複使用在其他地方已使用過的一般依賴(會回傳值),即使回傳值不會被使用,該依賴仍會被執行:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  2. tensorflow/c/eager/c_api_experimental.h

    // execution of newly issued ops.
    //
    // Note that outputs of discarded ops remain in a corrupt state and should not
    // be used for future calls.
    // TODO(agarwal): mark the affected handles and raise errors if they are used.
    TF_CAPI_EXPORT extern void TFE_ExecutorClearError(TFE_Executor*);
    
    // Sets a custom Executor for the current thread. All nodes created by this
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 39.5K bytes
    - Click Count (1)
  3. docs/zh/docs/tutorial/handling-errors.md

    ### 在代码中触发 `HTTPException` { #raise-an-httpexception-in-your-code }
    
    `HTTPException` 是额外包含了和 API 有关数据的常规 Python 异常。
    
    因为是 Python 异常,所以不能 `return`,只能 `raise`。
    
    这也意味着,如果你在*路径操作函数*里调用的某个工具函数内部触发了 `HTTPException`,那么*路径操作函数*中后续的代码将不会继续执行,请求会立刻终止,并把 `HTTPException` 的 HTTP 错误发送给客户端。
    
    在介绍依赖项与安全的章节中,你可以更直观地看到用 `raise` 异常代替 `return` 值的优势。
    
    本例中,客户端用不存在的 `ID` 请求 `item` 时,触发状态码为 `404` 的异常:
    
    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)
  4. docs/tr/docs/advanced/advanced-dependencies.md

    FastAPI 0.110.0 öncesinde, `yield` kullanan bir dependency kullanır, sonra o dependency içinde `except` ile bir exception yakalar ve exception'ı tekrar raise etmezseniz; exception otomatik olarak herhangi bir exception handler'a veya internal server error handler'a raise/forward edilirdi.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 10K bytes
    - Click Count (0)
  5. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    ### Sempre levante (`raise`) em Dependências com `yield` e `except` { #always-raise-in-dependencies-with-yield-and-except }
    
    Se você capturar uma exceção em uma dependência com `yield`, a menos que você esteja levantando outra `HTTPException` ou coisa parecida, **você deve relançar a exceção original**.
    
    Você pode relançar a mesma exceção utilizando `raise`:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  6. docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    ### 의존성 요구사항 { #dependency-requirements }
    
    (헤더같은) 요청 요구사항이나 하위-의존성을 선언할 수 있습니다:
    
    {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[8,13] *}
    
    ### 오류 발생시키기 { #raise-exceptions }
    
    다음 의존성은 기존 의존성과 동일하게 예외를 `raise`할 수 있습니다:
    
    {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[10,15] *}
    
    ### 값 반환하기 { #return-values }
    
    값을 반환하거나, 그러지 않을 수 있으며 값은 사용되지 않습니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 3.4K bytes
    - Click Count (0)
  7. docs/zh/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    路径装饰器依赖项也可以使用普通的依赖项*函数*。
    
    ### 依赖项的需求项 { #dependency-requirements }
    
    路径装饰器依赖项可以声明请求的需求项(比如响应头)或其他子依赖项:
    
    {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[8,13] *}
    
    ### 触发异常 { #raise-exceptions }
    
    路径装饰器依赖项与正常的依赖项一样,可以 `raise` 异常:
    
    {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[10,15] *}
    
    ### 返回值 { #return-values }
    
    无论路径装饰器依赖项是否返回值,路径操作都不会使用这些值。
    
    因此,可以复用在其他位置使用过的、(能返回值的)普通依赖项,即使没有使用这个值,也会执行该依赖项:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 2.8K bytes
    - Click Count (0)
  8. RELEASE.md

            rather than `ds`, `bs`.
        *   Fix docstring typos in `tf.distributions.bijectors.Bijector`.
        *   `tf.assert_equal` no longer raises `ValueError.` It now raises
            `InvalidArgumentError,` as documented.
        *   Update Getting Started docs and API intro.
    *   Google Cloud Storage (GCS):
        *   Add userspace DNS caching for the GCS client.
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Mon Mar 30 18:31:38 GMT 2026
    - 746.5K bytes
    - Click Count (3)
  9. docs/es/docs/tutorial/handling-errors.md

    {* ../../docs_src/handling_errors/tutorial001_py310.py hl[1] *}
    
    ### Lanza un `HTTPException` en tu código { #raise-an-httpexception-in-your-code }
    
    `HTTPException` es una excepción de Python normal con datos adicionales relevantes para APIs.
    
    Debido a que es una excepción de Python, no la `return`, sino que la `raise`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 9.6K bytes
    - Click Count (0)
  10. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    ### In Abhängigkeiten mit `yield` und `except` immer `raise` verwenden { #always-raise-in-dependencies-with-yield-and-except }
    
    Wenn Sie eine Exception in einer Abhängigkeit mit `yield` abfangen, sollten Sie – sofern Sie nicht eine andere `HTTPException` oder Ähnliches auslösen – **die ursprüngliche Exception erneut auslösen**.
    
    Sie können dieselbe Exception mit `raise` erneut auslösen:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 14.4K bytes
    - Click Count (0)
Back to Top