1. A data processing apparatus comprising: an input unit that inputs data; a data processing unit that performs predetermined processing on the data input by said input unit; a nonvolatile storage unit that stores the data on which the processing has been performed by said data processing unit; a first voltage supply unit that supplies voltage to said storage unit; a second voltage supply unit that supplies voltage to said storage unit when said first voltage supply unit is incapable of supplying voltage to said storage unit; a selecting unit that selects one of a plurality of erasing processes based on a status of processing of the data on which said data processing unit performs the predetermined processing; a detecting unit that detects an amount of electric power that can be supplied from said second voltage supply unit to said storage unit, and wherein said selecting unit selects one of the plurality of erasing processes based on the amount of electric power detected by said detecting unit and an amount of the data; a determining unit that determines an amount of data that can be erased from said storage unit by the amount of electric power detected by said detecting unit, and wherein said selecting unit selects one of the plurality of erasing processes based on whether the amount of the data is greater than the amount of data that can be erased; and a control unit responsive to said first voltage supply unit becoming incapable of supplying voltage to said storage unit, for controlling said storage unit to erase the data stored in said storage unit using the selected erasing process.