You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
3.3 KiB

<application>
<component name="Translation.Cache">
<option name="lastTrimTime" value="1676280247413" />
</component>
<component name="Translation.States">
<histories>
<item value="Handles errors emitted by this [Future]. This is the asynchronous equivalent of a &quot;catch&quot; block. Returns a new [Future] that will be completed with either the result of this future or the result of calling the `onError` callback. If this future completes with a value, the returned future completes with the same value. If this future completes with an error, then [test] is first called with the error value. If `test` returns false, the exception is not handled by this `catchError`, and the returned future completes with the same error and stack trace as this future. If `test` returns `true`, [onError] is called with the error and possibly stack trace, and the returned future is completed with the result of this call in exactly the same way as for [then]'s `onError`. If `test` is omitted, it defaults to a function that always returns true. The `test` function should not throw, but if it does, it is handled as if the `onError` function had thrown. Note that futures don't delay reporting of errors until listeners are added. If the first `catchError` (or `then`) call happens after this future has completed with an error then the error is reported as unhandled error. See the description on [Future]. Example: ```dart Future.delayed( const Duration(seconds: 1), () =&gt; throw 401, ).then((value) { throw 'Unreachable'; }).catchError((err) { print('Error: err'); Prints 401. }, test: (error) { return error is int &amp;&amp; error &gt;= 400; }); ``` The `Function` below stands for one of two types: - (dynamic) -&gt; FutureOr&lt;T&gt; - (dynamic, StackTrace) -&gt; FutureOr&lt;T&gt; Given that there is a `test` function that is usually used to do an `is` check, we should also expect functions that take a specific argument." />
<item value="If `test` returns `true`, [onError] is called with the error and possibly stack trace, and the returned future is completed with the result of this call in exactly the same way as for [then]'s `onError`." />
<item value="If `test` is omitted, it defaults to a function that always returns true. The `test` function should not throw, but if it does, it is handled as if the `onError` function had thrown." />
<item value="If [onError] is not given, and this future completes with an error, the error is forwarded directly to the returned future." />
<item value="If `eagerError` is true, the returned future completes with an error immediately on the first error from one of the futures. Otherwise all futures must complete before the returned future is completed (still with the first error; the remaining errors are silently dropped)." />
<item value="eager Error" />
<item value="A method returns a human readable string representing a file _size" />
<item value="[size] can be passed as number or as string the optional parameter [round] specifies the number of digits after commapoint (default is 2)" />
<item value="user Created" />
</histories>
<option name="languageScores">
<map>
<entry key="CHINESE" value="8" />
<entry key="ENGLISH" value="9" />
</map>
</option>
</component>
</application>