You can disconnect your Bluetooth devices by either switching them off, or by going to the Devices tab of the Bluetooth System Preferences panel, selecting the active device, and pressing Disconnect.
As long as I disconnect my devices first, I never see the error message.
[robg adds: I haven't seen any such issues on my MacBook Pro, but I figured this might be worth a shot for those who are experiencing the problem. If you have Bluetooth issues and try this hint, please post your experiences.]

