Few things are more frustrating than having a lens quit, especially when you are on an important photo shoot, or a once in a lifetime trip. If you have a modern camera, the failed lens might also be accompanied by an error code on the camera body. On Canon cameras this is usually Error 99.
Fortunately, there are things you can do to get your lens working again. This article at JimDoty.com gives you all the details.
What if you can’t get the lens working? It might be the camera. Try a different lens and see if it works. If it does, the lens that is giving you the error code probably needs to be repaired. Get that lens fixed and use your other lens/es. If you only have one lens, head to a local camera store and have them put one of their lenses on your camera. Take a picture and see if it works. If it does, your lens probably needs to be repaired and your camera is probably ok.
If you are on the trip of a lifetime and you can’t get your lens working, you can always rent a lens (or camera) from a local camera store, or order one from one of the major lens rental companies. Some companies can overnight a lens or camera to your location. This article has some lens/camera rental advice.
Two high rated companies for renting cameras and/or lenses.