Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 241 - 250 of 2,127 for finally (0.13 seconds)

  1. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    ///
    
    ## 包含 `yield` 和 `try` 的依赖项
    
    如果在包含 `yield` 的依赖中使用 `try` 代码块,你会捕获到使用依赖时抛出的任何异常。
    
    例如,如果某段代码在另一个依赖中或在 *路由函数* 中使数据库事务"回滚"或产生任何其他错误,你将会在依赖中捕获到异常。
    
    因此,你可以使用 `except SomeException` 在依赖中捕获特定的异常。
    
    同样,你也可以使用 `finally` 来确保退出步骤得到执行,无论是否存在异常。
    
    {* ../../docs_src/dependencies/tutorial007.py hl[3,5] *}
    ## 使用 `yield` 的子依赖项
    
    你可以声明任意数量和层级的树状依赖,而且它们中的任何一个或所有的都可以使用 `yield`。
    
    **FastAPI** 会确保每个带有 `yield` 的依赖中的"退出代码"按正确顺序运行。
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 11.3K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

    import org.mockito.Mockito;
    
    /**
     * Tests for RateLimiter.
     *
     * @author Dimitris Andreou
     */
    @NullUnmarked
    public class RateLimiterTest extends TestCase {
      private static final double EPSILON = 1e-8;
    
      private final FakeStopwatch stopwatch = new FakeStopwatch();
    
      public void testSimple() {
        RateLimiter limiter = RateLimiter.create(5.0, stopwatch);
        limiter.acquire(); // R0.00, since it's the first request
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 18:19:59 GMT 2025
    - 21.9K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

    import org.mockito.Mockito;
    
    /**
     * Tests for RateLimiter.
     *
     * @author Dimitris Andreou
     */
    @NullUnmarked
    public class RateLimiterTest extends TestCase {
      private static final double EPSILON = 1e-8;
    
      private final FakeStopwatch stopwatch = new FakeStopwatch();
    
      public void testSimple() {
        RateLimiter limiter = RateLimiter.create(5.0, stopwatch);
        limiter.acquire(); // R0.00, since it's the first request
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 18:19:59 GMT 2025
    - 21.9K bytes
    - Click Count (0)
  4. compat/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java

            }
        }
    
        @Test
        void testPerformProfileActivation() throws ParseException {
            final CommandLineParser parser = new DefaultParser();
    
            final Options options = new Options();
            options.addOption(Option.builder(Character.toString(CLIManager.ACTIVATE_PROFILES))
                    .hasArg()
                    .build());
    
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Sep 17 10:01:14 GMT 2025
    - 30.9K bytes
    - Click Count (0)
  5. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    例えば、途中のどこかの時点で、別の依存関係や*path operation*の中で、データベーストランザクションを「ロールバック」したり、その他のエラーを作成したりするコードがあった場合、依存関係の中で例外を受け取ることになります。
    
    そのため、依存関係の中にある特定の例外を`except SomeException`で探すことができます。
    
    同様に、`finally`を用いて例外があったかどうかにかかわらず、終了ステップを確実に実行することができます。
    
    {* ../../docs_src/dependencies/tutorial007.py hl[3,5] *}
    
    ## `yield`を持つサブ依存関係
    
    任意の大きさや形のサブ依存関係やサブ依存関係の「ツリー」を持つことができ、その中で`yield`を使用することができます。
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 12.3K bytes
    - Click Count (0)
  6. guava/src/com/google/common/collect/Queues.java

              if (e == null) {
                break; // we already waited enough, and there are no more elements in sight
              }
              buffer.add(e);
              added++;
            }
          }
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
        return added;
      }
    
      /**
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Nov 04 17:24:58 GMT 2025
    - 18K bytes
    - Click Count (0)
  7. LICENSES/vendor/cyphar.com/go-pathrs/LICENSE

    compliant, then the rights granted under this License from a particular
    Contributor are reinstated (a) provisionally, unless and until such
    Contributor explicitly and finally terminates Your grants, and (b) on an
    ongoing basis, if such Contributor fails to notify You of the
    non-compliance by some reasonable means prior to 60 days after You have
    Created: Fri Dec 26 09:05:12 GMT 2025
    - Last Modified: Wed Nov 12 14:46:31 GMT 2025
    - 16.5K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/collect/ArrayTable.java

            : new ArrayTable<R, C, V>(table);
      }
    
      private final ImmutableList<R> rowList;
      private final ImmutableList<C> columnList;
    
      // TODO(jlevy): Add getters returning rowKeyToIndex and columnKeyToIndex?
      private final ImmutableMap<R, Integer> rowKeyToIndex;
      private final ImmutableMap<C, Integer> columnKeyToIndex;
      private final @Nullable V[][] array;
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Aug 13 19:39:21 GMT 2025
    - 26.2K bytes
    - Click Count (0)
  9. guava/src/com/google/common/collect/ArrayTable.java

            : new ArrayTable<R, C, V>(table);
      }
    
      private final ImmutableList<R> rowList;
      private final ImmutableList<C> columnList;
    
      // TODO(jlevy): Add getters returning rowKeyToIndex and columnKeyToIndex?
      private final ImmutableMap<R, Integer> rowKeyToIndex;
      private final ImmutableMap<C, Integer> columnKeyToIndex;
      private final @Nullable V[][] array;
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Nov 17 22:50:48 GMT 2025
    - 26.9K bytes
    - Click Count (0)
  10. docs/bucket/replication/README.md

    ## Highlights
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Tue Aug 12 18:20:36 GMT 2025
    - 18.3K bytes
    - Click Count (0)
Back to Top