- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 33 for exception_handlers (0.24 seconds)
-
docs/pt/docs/tutorial/handling-errors.md
Se você quer usar a exceção em conjunto com o mesmo manipulador de exceção *default* do **FastAPI**, você pode importar e re-usar esses manipuladores de exceção do `fastapi.exception_handlers`: {* ../../docs_src/handling_errors/tutorial006_py39.py hl[2:5,15,21] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 10.2K bytes - Click Count (0) -
docs/es/docs/tutorial/handling-errors.md
Si quieres usar la excepción junto con los mismos manejadores de excepciones predeterminados de **FastAPI**, puedes importar y reutilizar los manejadores de excepciones predeterminados de `fastapi.exception_handlers`: {* ../../docs_src/handling_errors/tutorial006_py39.py hl[2:5,15,21] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 9.7K bytes - Click Count (0) -
docs/ja/docs/tutorial/handling-errors.md
```Python from starlette.exceptions import HTTPException as StarletteHTTPException ``` ### **FastAPI** の例外ハンドラの再利用 また、何らかの方法で例外を使用することもできますが、**FastAPI** から同じデフォルトの例外ハンドラを使用することもできます。 デフォルトの例外ハンドラを`fastapi.exception_handlers`からインポートして再利用することができます: {* ../../docs_src/handling_errors/tutorial006.py hl[2,3,4,5,15,21] *} この例では、非常に表現力のあるメッセージでエラーを`print`しています。Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 11.6K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
* under the License. */ package org.apache.maven.exception; /** * Transform an exception into useful end-user message. * * @since 3.0-alpha-3 */ public interface ExceptionHandler { ExceptionSummary handleException(Throwable e);Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 1023 bytes - Click Count (0) -
tests/test_validation_error_context.py
app.mount(path="/sub", app=sub_app) @app.exception_handler(RequestValidationError) @sub_app.exception_handler(RequestValidationError) async def request_validation_handler(request: Request, exc: RequestValidationError): captured_exception.capture(exc) raise exc @app.exception_handler(ResponseValidationError) @sub_app.exception_handler(ResponseValidationError)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 06 12:21:57 GMT 2025 - 4.7K bytes - Click Count (0) -
docs_src/handling_errors/tutorial004_py39.py
from starlette.exceptions import HTTPException as StarletteHTTPException app = FastAPI() @app.exception_handler(StarletteHTTPException) async def http_exception_handler(request, exc): return PlainTextResponse(str(exc.detail), status_code=exc.status_code) @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc: RequestValidationError): message = "Validation errors:"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 920 bytes - Click Count (0) -
impl/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java
@Inject private LifeCyclePluginAnalyzer lifeCyclePluginAnalyzer; @Inject private LifecycleTaskSegmentCalculator lifeCycleTaskSegmentCalculator; @Inject private ExceptionHandler exceptionHandler; protected String getProjectsDirectory() { return "src/test/projects/lifecycle-executor"; } @Test void testCreation() throws Exception {Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 2.7K bytes - Click Count (0) -
docs_src/handling_errors/tutorial003_py39.py
from fastapi import FastAPI, Request from fastapi.responses import JSONResponse class UnicornException(Exception): def __init__(self, name: str): self.name = name app = FastAPI() @app.exception_handler(UnicornException) async def unicorn_exception_handler(request: Request, exc: UnicornException): return JSONResponse( status_code=418,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 626 bytes - Click Count (0) -
docs_src/handling_errors/tutorial005_py39.py
from fastapi.encoders import jsonable_encoder from fastapi.exceptions import RequestValidationError from fastapi.responses import JSONResponse from pydantic import BaseModel app = FastAPI() @app.exception_handler(RequestValidationError) async def validation_exception_handler(request: Request, exc: RequestValidationError): return JSONResponse( status_code=422,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 626 bytes - Click Count (0) -
impl/maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java
MojoExecutionException mojoEx = new MojoExecutionException("Error executing Jetty: Unable to establish loopback connection", ioEx); ExceptionHandler exceptionHandler = new DefaultExceptionHandler(); ExceptionSummary exceptionSummary = exceptionHandler.handleException(mojoEx); String expectedReference = "http://cwiki.apache.org/confluence/display/MAVEN/ConnectException";Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 6.3K bytes - Click Count (0)