- Sort Score
- Num 10 results
- Language All
Results 191 - 200 of 353 for excepciones (0.1 seconds)
-
src/test/java/jcifs/smb/SimpleMemoryManagementTest.java
// Configure transport to throw exception on release Mockito.doThrow(new RuntimeException("Test exception")).when(mockTransport).release(); session.acquire(); // Should handle exceptions gracefully assertDoesNotThrow(() -> session.release()); } /** * Test AutoCloseable pattern */ @Test @Timeout(5)Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sun Aug 31 08:00:57 GMT 2025 - 5.7K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/ExecutionError.java
* possibly run in another thread. That cause should itself be an {@code Error}; if not, use {@code * ExecutionException} or {@link UncheckedExecutionException}. This allows the client code to * continue to distinguish between exceptions and errors, even when they come from other threads. * * @author Chris Povirk * @since 10.0 */ @GwtCompatible public class ExecutionError extends Error { /*Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Feb 13 17:34:21 GMT 2025 - 4K bytes - Click Count (0) -
tests/test_dependency_yield_scope_websockets.py
from contextvars import ContextVar from typing import Annotated, Any import pytest from fastapi import Depends, FastAPI, WebSocket from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient global_context: ContextVar[dict[str, Any]] = ContextVar("global_context", default={}) # noqa: B039 class Session: def __init__(self) -> None: self.open = True async def dep_session() -> Any:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 6K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/com/SmbComTreeDisconnectTest.java
} // Wait for all threads to complete for (Thread thread : threads) { thread.join(); } // Then - no exceptions should have been thrown assertTrue(true); // If we reach here, no exceptions occurred } /** * Test consistency across multiple calls */ @Test @DisplayName("Test consistency across multiple calls")Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.5K bytes - Click Count (0) -
src/test/java/jcifs/util/AuthenticationRateLimiterTest.java
// Wait for completion for (Thread t : threads) { t.join(); } // Verify thread safety - no unexpected exceptions assertEquals(0, exceptionCount.get(), "Should not have unexpected exceptions"); // At least some threads should complete successfully assertTrue(successfulThreads.get() > 0, "At least some threads should complete successfully");Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 15.8K bytes - Click Count (0) -
docs/zh/docs/tutorial/handling-errors.md
一般情况下可能不会需要在代码中直接使用响应头。 但对于某些高级应用场景,还是需要添加自定义响应头: {* ../../docs_src/handling_errors/tutorial002.py hl[14] *} ## 安装自定义异常处理器 添加自定义处理器,要使用 [Starlette 的异常工具](https://www.starlette.dev/exceptions/)。 假设要触发的自定义异常叫作 `UnicornException`。 且需要 FastAPI 实现全局处理该异常。 此时,可以用 `@app.exception_handler()` 添加自定义异常控制器: {* ../../docs_src/handling_errors/tutorial003.py hl[5:7,13:18,24] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 8.2K bytes - Click Count (0) -
src/test/java/jcifs/config/DelegatingConfigurationTest.java
assertNull(delegatingConfig.getMaximumVersion(), "Should return null when delegate returns null"); } @Test @DisplayName("Delegation should handle exceptions from delegate") void testExceptionHandling() { // Given RuntimeException testException = new RuntimeException("Test exception"); when(mockDelegate.getResponseTimeout()).thenThrow(testException);
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 20.7K bytes - Click Count (0) -
compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGenerator.java
// as it would pull in dependency on: // - maven-plugin-api (for model) // - Plexus Container (for model supporting classes and exceptions) XmlNode root = XmlService.read(is, null); String groupId = mayGetChild(root, "groupId"); String artifactId = mayGetChild(root, "artifactId");Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Tue Mar 25 09:45:07 GMT 2025 - 7.8K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbExceptionTest.java
assertNotNull(stringRep); assertTrue(stringRep.contains("SmbException")); assertTrue(stringRep.contains(message)); } @Test @DisplayName("Should handle authentication exceptions") void testAuthenticationExceptions() { // Given int ntStatus = NtStatus.NT_STATUS_LOGON_FAILURE; // When SmbException exception = new SmbException(ntStatus, false);
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 7.9K bytes - Click Count (0) -
tests/test_dependency_yield_scope.py
import json from typing import Annotated, Any import pytest from fastapi import APIRouter, Depends, FastAPI, HTTPException from fastapi.exceptions import FastAPIError from fastapi.responses import StreamingResponse from fastapi.testclient import TestClient class Session: def __init__(self) -> None: self.open = True def dep_session() -> Any: s = Session() yield s s.open = FalseCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 6.7K bytes - Click Count (0)