I agree with Matt, using panic is fine when you are debugging. I do not usually do panic in production code unless it is because of the loss of some asset required to start.
GO has robust error handling. You should write the function to return an error. If you deploy your program to a client site, you can have your error handler send you an email that the user is trying to divide by zero, or you can have it send a post to your server so you will have a log of all the users trying to divide byzero, or just have it record the error to a log file that you can examine onsite later. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
