1. A method comprising: retrieving, from a first storage area, hardware initialization code that is adapted to initialize a device, wherein the hardware initialization code also includes an error action placeholder corresponding to one or more actions that are performed in response to detecting a failure during the initialization of the device; retrieving error action information from a second storage area, wherein the error action information describes at least one of the one or more actions; converting the error action information to one or more macros, wherein each of the one or more macros includes one or more lines of code; matching the error action placeholder to one of the one or more macros; replacing the error action placeholder in the hardware initialization code with the lines of code corresponding to the matched macro, resulting in modified hardware initialization code; compiling the modified hardware initialization code, resulting in hardware initialization firmware code; and executing the hardware initialization firmware code wherein, during the execution, the hardware initialization firmware code executes one or more of the actions in response to the device failing the initialization.