- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 349 for Exception (0.05 seconds)
-
docs/en/docs/tutorial/handling-errors.md
{* ../../docs_src/handling_errors/tutorial002_py39.py hl[14] *} ## Install custom exception handlers { #install-custom-exception-handlers } You can add custom exception handlers with <a href="https://www.starlette.dev/exceptions/" class="external-link" target="_blank">the same exception utilities from Starlette</a>. Let's say you have a custom exception `UnicornException` that you (or a library you use) might `raise`.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 9K bytes - Click Count (0) -
tests/test_validation_error_context.py
captured_exception.exception = None try: client.get("/items/") except Exception: pass assert captured_exception.exception is not None error_str = str(captured_exception.exception) assert "get_item" in error_str assert "/items/" in error_str def test_websocket_validation_error_includes_endpoint_context(): captured_exception.exception = None try: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) -
fastapi/exceptions.py
from pydantic import BaseModel, create_model from starlette.exceptions import HTTPException as StarletteHTTPException from starlette.exceptions import WebSocketException as StarletteWebSocketException class EndpointContext(TypedDict, total=False): function: str path: str file: str line: int class HTTPException(StarletteHTTPException): """ An HTTP exception you can raise in your own code to show errors to the client.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 6.8K bytes - Click Count (0) -
docs/de/docs/tutorial/dependencies/dependencies-with-yield.md
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: {* ../../docs_src/dependencies/tutorial008d_an_py39.py hl[17] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 14.7K bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
If you use a `try` block in a dependency with `yield`, you'll receive any exception that was thrown when using the dependency. For example, if some code at some point in the middle, in another dependency or in a *path operation*, made a database transaction "rollback" or created any other exception, you would receive the exception in your dependency. So, you can look for that specific exception inside the dependency with `except SomeException`.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 12.9K bytes - Click Count (0) -
compat/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
private Model read(String pom) throws Exception { String resource = "/poms/validation/" + pom; try (InputStream is = getClass().getResourceAsStream(resource)) { assertNotNull(is, "missing resource: " + resource); return new Model(new MavenStaxReader().read(is)); } } private SimpleProblemCollector validate(String pom) throws Exception {Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Sep 17 10:01:14 GMT 2025 - 33.9K bytes - Click Count (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
* @param exception The exception that caused this problem, may be {@code null}. */ // mkleint: does this need to be public? public DefaultModelProblem( String message, Severity severity, Version version, Model source, int lineNumber, int columnNumber, Exception exception) { this( message,Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Jul 23 17:27:08 GMT 2025 - 5.6K bytes - Click Count (0) -
impl/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java
Exception e = assertThrows(Exception.class, () -> ee.evaluate("${session.rootDirectory}")); e = assertInstanceOf(IntrospectionException.class, e.getCause()); e = assertInstanceOf(IllegalStateException.class, e.getCause()); assertEquals(RootLocator.UNABLE_TO_FIND_ROOT_PROJECT_MESSAGE, e.getMessage()); } @Test void testRootDirectory() throws Exception {
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Mar 26 19:31:34 GMT 2025 - 19.4K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Sat Apr 05 11:52:05 GMT 2025 - 10.9K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionException.java
List<Exception> exceptions = result.getResolutionErrors(dependency); for (Exception e : exceptions) { msg.append("\t").append(e.getMessage()).append(System.lineSeparator()); } } for (Exception exception : result.getCollectionErrors()) { msg.append(exception.getMessage()).append(System.lineSeparator());
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Jul 23 10:13:56 GMT 2025 - 2.6K bytes - Click Count (0)