algorithmic modeling for Rhino
Hi David-
I'm in VStudio debugging some grasshopper code which uses a mixture of C# code as "scripted" components and some real C# development (which is what I'm trying to debug). As I'm messing around I sometimes end up disconnecting and feeding erroneous inputs into my C# component. Something that causes a null reference in the script. Which throws an exception.
All that's fine- the problem I have is that the exception doesn't get handled anywhere so it tries to break in the Visual Studio debugger which makes it ask for source files etc etc.
I can solve my problem if I always wrap my c# routine in a try/catch and toss the exceptions away. But it might be better if Grasshopper actually handled any exceptions thrown out of the user code and pass the message onto the component message box.
Cheers-
- B -
Tags:
It should. The entire user script runs inside a Try-Catch block. In fact every single component SolveInstance() method runs inside its own Try-Catch block as any crash inside SolveInstance would bring down Rhino+Grasshopper.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
David - Is there a place in the SDK or RhinoCommon that can be referred to for error / exception catching etc?
I don't understand. 'referred to' what?
Grasshopper and RhinoCommon use standard .NET exceptions and try...catch blocks.
--
David Rutten
david@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by