Patent ID: 6868510

Claim:
A terminal which processes an error occurring in the terminal in accordance with a mode selected by a user from among a normal mode and a debug mode, said terminal comprising: a mode information holder adapted to hold mode information that indicates which mode is the selected mode; an error detector adapted to detect an error occurring in the terminal; a mode judge unit adapted to judge which mode is the selected mode when the error detector detects the error, by referring to the mode information, the mode judge unit producing an initialization request if the normal mode is the selected mode, while the mode judge unit does not produce the initialization request if the debug mode is the selected mode; and an initializer which initialize the terminal in response to the initialization request; wherein the mode information holder comprises a register adapted to store, as the mode information, a flag indicative of either one of the normal mode and the debug mode, and wherein the initializer carries out initialization which comprises a first initialization phase and a second initialization phase carried out after the first initialization phase, the terminal further comprising: a memory which is selectively put into a hold state and a release state; an error information controller adapted to write error information into the memory when the error detector detects the error; an error information analyzer adapted to judge whether or not the memory stores the error information after the initializer carries out the first initialization phase, the error information analyzer notifying the initializer of the judgement; an information switch adapted to switch between two switch conditions which indicate the hold state and the release state, respectively; and a switch detector adapted to detect the switch condition of the information switch to notify the initializer of the switch condition so that, if the switch condition indicates the hold state in a condition that the memory stores the error information, the initializer keeps the memory storing the error information and then carries out the second initialization phase.