Force return error in golang

2 posts / 0 new
Last post
boblewis1857's picture
Offline
Last seen: 1 year 5 months ago
Joined: 07/18/2023
Posts: 1
Force return error in golang

I want to test how certain code handles errors.

I want a function to return an error.

I have tried typing return 0/0 but then my application won't build

How can I force return an error?

Organization:
Keywords:
Howard's picture
Offline
Last seen: 1 week 2 days ago
Joined: 11/29/2012
Posts: 618

Sorry, this is a forum for Connext DDS.  I'm not sure how your inquiry relates to DDS or RTI Connext?