Read run errors dynamo

Hi all,

Is it possibile to read if a script has errors?
We are building with C# a script that make a ribbon in revit that can run a dynamo script.
This works fine but I can’t see of the script in run with errors.

I wondering or it is possible to read if this script had an error.
When he have an error I will use a passthrough and give the user a message back with “Run complete with errors.”

Thanks in advance.

Kind Regard,

Jan Willem