$catch

Used to create a sub-block between $try and $endtry that will contain the code that will be executed when an error occurs.

BDScript 2

Can only be used in BDScript 2.

Syntax

$catch

Example

$nomention
$try
  $calculate[$message]
$catch
  ❌ Invalid expression!
$endtry
!example abc ❌ Invalid expression! !example 60+9 69

What is this?

How $calculate[], $message, $try and $endtry works?

Read more

For more information, read the Error Handling guide.