"The code caused the capacitors to keep charging even after they had reached their limit, until kaboom."<p>Sorry, but that isn't possible. Maybe if you keep raising the voltage (which would be a pretty strange thing to do), but even then it wouldn't cause an explosion, but rather a short. And no capacitor I have ever heard of can store enough energy to explode.