Force the returned value in test.catch() and test.catchOrNull() (#1910)
This commit is contained in:
1 parent
9f79fe47da
commit
e18d962033
5 files changed
+40
-4
No files matched your search
@@ -88,10 +88,14 @@ examples: Mapping<String, Listing<unknown>>?
|
||||
|
||||
/// Applies [fun] and returns the error thrown.
|
||||
///
|
||||
/// The value returned by [fun] is fully evaluated, so an error inside a nested object member will be caught too.
|
||||
///
|
||||
/// Throws if [fun] did not throw an error.
|
||||
external const function catch(fun: () -> Any): String
|
||||
|
||||
/// Applies [fun] and returns the error thrown.
|
||||
///
|
||||
/// The value returned by [fun] is fully evaluated, so an error inside a nested object member will be caught too.
|
||||
///
|
||||
/// Returns [null] if [fun] did not throw an error.
|
||||
external const function catchOrNull(fun: () -> Any): String?
|
||||
Reference in new issue
Block a user