Apparent errer when installing plugin

I found the problem. I didn’t realize this was a generic message for pretty much all errors. I stripped everything out of the activation routine (similar to above) and ran it… got no errors. Started adding “stuff” back. And it appears a call to flush() at the end of the activation function trying to force the /wp-content/debug.log to be flushed to disk was triggering the error.

Thanks to everyone here that helped! 😉