Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 11 of 11 for StarletteHTTPException (0.55 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs/zh-hant/docs/tutorial/handling-errors.md

    如此一來,如果 Starlette 的內部程式碼,或任何 Starlette 擴充/外掛 raise 了 Starlette 的 `HTTPException`,你的處理器就能攔截並處理它。
    
    在這個範例中,為了能在同一份程式碼中同時使用兩種 `HTTPException`,我們把 Starlette 的例外重新命名為 `StarletteHTTPException`:
    
    ```Python
    from starlette.exceptions import HTTPException as StarletteHTTPException
    ```
    
    ### 重用 **FastAPI** 的例外處理器 { #reuse-fastapis-exception-handlers }
    
    如果你想在使用例外的同時,沿用 **FastAPI** 的預設例外處理器,你可以從 `fastapi.exception_handlers` 匯入並重用預設的處理器:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 8.3K bytes
    - Click Count (0)
Back to Top