This suit was based upon a note for $390.26,, dated December 30,1881, and bearing interest from date at the rate of eight per cent, per annum. The plaintiffs in error were duly cited, but filed no answer; and without any amendment of the petition a judgment was rendered against plaintiffs in error, June 12, 1882, for the sum of $792.54. It -was therein recited: “ This-day came the plaintiffs by attorney and announced ready for trial,. *451when the following agreed judgment was rendered,” etc. There is a paper improperly copied into the record, neither signed by any person nor filed among the papers of the cause, that may have been prepared as an agreement to be signed by the parties as a basis for an agreed judgment, but this is but conjectural. As presented by the record, that paper cannot be considered as any part of the transcript. It is claimed that, considering the judgment as one rendered upon confession for the excess of $378, there is no foundation in the pleadings; that the error is fundamental in character, and therefore not waived by the confession of judgment.
The statutory provisions relating to the subject are as follows:
“Art. 1347. Any person indebted, or against whom a cause of action exists, may, without process, appear, in person or by attorney, and confess judgment therefor in open court; but in such case a petition shall be filed, and the justness of the debt or cause of action be sworn to by the person in whose favor the judgment is confessed.
“Art. 1349. Every judgment by confession, duly made, shall operate as a release of all errors in the record thereof, but such judgment may be impeached for fraud or other equitable cause.” Eevised Statutes.
In construing these provisions, it has been held that the filing of the petition at or before the rendition of the judgment is essential. Montgomery v. Barnett, 8 Tex., 146. Also, that where the suit was upon a promissory note, which was made part of the petition, and the amount in the confession was not stated, it was held to be sufficient, as the judgment was rendered for the amount due on the note. Little v. Crittenden, 10 Tex., 192.
In Storey v. Nichols, 22 Tex., 91, it is said: “ So, too, if a cause of action is set out in the petition on an open account for $200, and a judgment is expressly confessed on a note for $3,000, it can hardly be doubted but that this judgment would be held erroneous; because for this last cause of action there would have been no petition, no process, and no affidavit as required by law.” The doctrine is firmly established that facts not alleged, though proved, cannot form the basis of a decree or judgment. Gray v. Osborne, 24 Tex., 157; Hall v. Jackson, 3 Tex., 305.
To the extent that a judgment has no basis in the pleadings, it is erroneous. But then the question arises, is it such an error as would be waived by the confession of judgment?
In Goss v. Pilgrim, 28 Tex., 263, the objection was urged that the judgment was excessive by reason of an error in the calculation of *452the interest, etc., and the court said: “ We have not entered into a close computation of the amounts due on the several notes, it not being our duty, as we conceive, but presume the amount adjudged met with the approbation of the defendants below, when they confessed or agreed.to the judgment.”
Here the amount adjudged in excess of that claimed in the petition is so very large as to forbid the idea that it arose from a mis: calculation of interest. But it must be assumed that other claims than that asserted in the petition entered into and formed in part the amount adjudged.
Thus considered, is it competent under the statute to confess judgment for other than the cause of action stated in the petition, so that such judgment will operate a waiver of all errors?
Such a confession of judgment as to the cause of action set up in the petition certainly does waive all errors. It matters not how defectively the cause of action may be stated, or what errors have been committed by the court in ruling upon the pleadings, etc., prior to the rendition of such judgment; these are all waived by it. It is essential to a valid judgment that a petition should be filed. Certainly it is not the policy of the statute, that, in such cases, one cause of action might be asserted in the petition, while the judgment should be rendered for another or different cause of action. • To permit that to be done would, in effect, nullify that provision which requires the petition to be filed before the entry of the judgment.
We are of the opinion, therefore, that the confession of judgment in this case was not within the meaning of the statute duly made, so as to work a waiver of the error complained about.
Our conclusion is.that the judgment ought to be reversed and the cause remanded.
Reversed and demanded.
[Opinion adopted April 20, 1884.]