A method for controlling an electronic apparatus , the method comprising: acquiring (S1510) an output value from a function module as a result of inputting an input value to the function module to perform a function corresponding to the function module included in the electronic apparatus ; identifying (S1520) at least one safety mechanism to be applied to the function module based on the input value and the output value and a safety integrity level of the function module; and detecting (S1530) an error operation of the function module based on the output of the identified at least one safety mechanism; characterized in that the identifying (S1520) of the at least one safety mechanism comprises: identifying (S1520, S1610) a first safety mechanism based on the input value and the output value and a safety integrity level of the function module, and identifying (S1520, S1630) a second safety mechanism being different from the first safety mechanism based on the safety integrity level of the function module, when an error operation of the function module is not detected based on the first safety mechanism and the input value and the output value satisfying a preset condition; wherein the detecting (S1530) of the error operation of the function module is based on applying the second safety mechanism when the error operation is not detected by applying the first safety mechanism. acquiring (S1510) an output value from a function module as a result of inputting an input value to the function module to perform a function corresponding to the function module included in the electronic apparatus ; identifying (S1520) at least one safety mechanism to be applied to the function module based on the input value and the output value and a safety integrity level of the function module; and detecting (S1530) an error operation of the function module based on the output of the identified at least one safety mechanism; characterized in that the identifying (S1520) of the at least one safety mechanism comprises: identifying (S1520, S1610) a first safety mechanism based on the input value and the output value and a safety integrity level of the function module, and identifying (S1520, S1630) a second safety mechanism being different from the first safety mechanism based on the safety integrity level of the function module, when an error operation of the function module is not detected based on the first safety mechanism and the input value and the output value satisfying a preset condition; identifying (S1520, S1610) a first safety mechanism based on the input value and the output value and a safety integrity level of the function module, and identifying (S1520, S1630) a second safety mechanism being different from the first safety mechanism based on the safety integrity level of the function module, when an error operation of the function module is not detected based on the first safety mechanism and the input value and the output value satisfying a preset condition; wherein the detecting (S1530) of the error operation of the function module is based on applying the second safety mechanism when the error operation is not detected by applying the first safety mechanism. <EOS>