1. A computer system for salvaging a partially executed hardware transaction, the computer system comprising: a memory; and a processor in communication with the memory, wherein the computer system is configured to perform a method, said method comprising: saving, by the processor, state information in a first code region of a first hardware transaction, the state information useable to determine whether the first hardware transaction is to be salvaged or to be aborted; detecting, by the processor, an about to fail condition in the first code region of the first hardware transaction; based on the detecting, executing, by the processor, an about-to-fail handler, the about-to-fail handler using the saved state information to determine whether the first hardware transaction is to be salvaged or to be aborted; and based on the transaction being to be salvaged, using, by the processor executing the about-to-fail handler, the saved state information to determine what portion of the first hardware transaction to salvage.