Using the Zernike and the Karhunen-Loeve modal reconstruction algorithm, three kinds of reconstruction error of a Hartmann sensor the atmosphere disturbed wavefront was analyzed: the mode coupling error, the mode cutting error and the error causing by measurement noise. The experiment data of a practical Hartmann sensor were analyzed in this paper too. It is showed that the optimal mode number was associated to the signal to noise ratio (SNR), and the Hartmann sensor was suffered from measurement noise severely in the condition of weak turbulence.