In the present paper, we generalize the method suggested in an earlier paper by the author and overcome its main deficiency. First, we modify the well-known Prony method, which subsequently will be utilized for recovering exactly the locations of jump discontinuities and the associated jumps of a piecewise constant function by means of its Fourier coefficients with respect to any system of the classical orthogonal polynomials. Next, we will show that the method is applicable to a wider class of functions, namely, to the class of piecewise smooth functions—for functions which piecewise belong to C 2 [ − 1 , 1 ] C^2[-1,1] , the locations of discontinuities are approximated to within O ( 1 / n ) O(1/n) by means of their Fourier-Jacobi coefficients. Unlike the previous one, the generalized method is robust, since its success is independent of whether or not a location of the discontinuity coincides with a root of a classical orthogonal polynomial. In addition, the error estimate is uniform for any [ c , d ] ⊂ ( − 1 , 1 ) [c,d]\subset (-1,1) . To the end, we discuss the accuracy, stability, and complexity of the method and present numerical examples.