Then you've done a poor job of flight planning. If however you find yourself in this situation, start a deviation around the line as soon as possible. If you deviate soon enough you should be able to get around the line without burning too much fuel.
By the way, I realize you are trolling, but young pilots may read this thread and think it is ok to fly through a thunderstorm. DON'T DO IT.