ReferenceScript nodesUtilities › Flow Control
Try
Does body. If it goes wrong, failed goes on with the error.
▸Try
Try Body
On Error
Error Message
Completed
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
in | what happens next | – | – |
Outputs
| Pin | Type |
|---|---|
Try Bodybody | what happens next |
On Errorfailed | what happens next |
Error Messageerror | text |
Completedthen | what happens next |
The code it becomes
The graph below written as a script would write it.
let s2_error = "";// On Scene Starttry { scene.log(s2_error);} catch (e) { if (/stopped$/.test(String(e && e.message)) || (e && e.breakpoint)) throw e; s2_error = String(e && e.message || e);}In a graph
◆On Scene Start
▸Try
Try Body
On Error
Error Message
Completed
ƒPrint
In Text
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.