Share a simple way to throw extra info in the “bubble"

In your function, instead of just using “return”, using “throw new ArgumentException”. This helps deliver error info to SolveInstance

public void Function(Curve curve)
{
.
.
.
   CurveIntersections intersections = Intersection.CurveSelf(curve, tolerance);
   if (intersections.Count == 0)
   {
      throw new ArgumentException("Detect no self-intersction on a curve, output original curve.", "Intersections"); 
      // above line is like return + message.
   }
.
.
.

}

In SolveInstance block, instead of using function directly, using “try…catch”. “catch” will catch the error info pass out from function.

try
{
      // your function here.
}
catch (ArgumentException e)
{
     AddRuntimeMessage(GH_RuntimeMessageLevel.Remark, e.Message);
}

Rhino_WutnFk1wle
It will show error message and the param name.

Don’t forget final build is in release model. try and catch are slower in debug model.