Motion
Get Motion

ReferenceScript nodesUtilities › Flow Control

Try

Does body. If it goes wrong, failed goes on with the error.

Inputs

PinTypeStarts atNotes
inwhat happens next––

Outputs

PinType
Try Bodybodywhat happens next
On Errorfailedwhat happens next
Error Messageerrortext
Completedthenwhat 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

The node with what starts it and Print to show what it gives, as Studio draws them.