aboutsummaryrefslogtreecommitdiff
path: root/help/catch.md
blob: a14cb6d15da6e0f54c50b1329c6c0721a5dffd7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/catch.html).*

# Circled Triangle Down (`⎊`)

## `𝔽⎊𝔾 𝕩`, `𝕨 𝔽⎊𝔾 𝕩`: Catch

Apply `𝔽` to the arguments.

If an error happens when `𝔽` is applied, cancel its execution, apply `𝔾` to the arguments and return the results.

Otherwise, return the results of `𝔽`.

           ∾⎊{"error occurred with argument: "∾•Fmt 𝕩} 1

           ∾⎊{"error occurred with argument: "∾•Fmt 𝕩} ⟨⟨1,2⟩, ⟨3,4⟩⟩