It's not good for them, and having too much can be fatal.
Though, I had a cat, living till age of 18, that went crazy for 7/11 double chocolate glazed donuts when she smelled it. In being a child, but knowing it wasn't all that good, I gave her a few small crumbs every now and again when I had one.
Not recommended, but for example purposes, little bits of chocolate doesn't really hurt them.
But please, I'm not saying make it a snack time treat.