Skip to content

Control: When error () is catched do ()

Jaume Olivé Petrus edited this page Oct 29, 2017 · 9 revisions

This block is a Control block that execute its script only if an specified exception is catched. This script can only be used in the catch part of a "Try () catch () finally ()" block.

Shape

Example

In this example a transmission to the LoRa network is protected by a try block. The transmission fails because a network connection is not stablished.

Run this example in The Whitecat IDE.

Clone this wiki locally