I've made many mistakes while taking photographs over the years. One thing I love about my digital camera is the ability to shoot in RAW. That means that most information gathered off of the digital sensor is saved in my RAW file. Why do I want that you might ask. Well, it gives me more options when editing. In a typical JPEG image the exposure and white balance is already "baked in". With a RAW photo I can adjust the photo to a greater degree. Below shows the saving grace of shooting in RAW.
Below is the original image exposure and contrast out of the camera.
Using the RAW photo I was able to adjust the exposure, white balance, and contrast to "save the image".
So the moral of the story is not to try and make bad images good, but to use your camera's RAW ability to keep your editing options open. This doesn't help out of focus or badly composed images. Remember all cameras work differently and you should read your manual for settings. Please test this before taking photos of something important!