
39 Wn.2d 836 (1951)
239 P.2d 349
JOHN HENRY NICHOLS, Appellant,
v.
ALBERT C. SEVERTSEN et al., Respondents.[1]
No. 31803.
The Supreme Court of Washington, Department One.
December 27, 1951.
John W. Fishburne and Harry H. Johnston, for appellant.
Scott, Langhorne & McGavick, for respondent Severtsen et al.
John J. O'Connell, Valen H. Honeywell, Jr., and Norbert F. Knecht, for respondent Masters.
WEAVER, J.
This is an action for damages for malicious prosecution based upon the alleged wrongful initiation of insanity proceedings. A demurrer to the second amended complaint was sustained, and plaintiff has appealed from a judgment dismissing the action.
[1, 2] Actions for damages for malicious prosecution are not favored in law, although they will be readily upheld when the proper elements have been presented. Peasley v. Puget Sound Tug & Barge Co., 13 Wn. (2d) 485, 125 P. (2d) 681. To support an action of this nature, the complaint must allege (1) that a prosecution was commenced against the plaintiff; (2) that it was instituted or instigated by the defendant; (3) that it was malicious; (4) that *838 it was without probable cause; (5) that the proceeding terminated on the merits in favor of plaintiff or was abandoned; and (6) that the plaintiff suffered injury or damage as a result of the prosecution. MacEachern v. MacEachern, 126 Wash. 32, 216 Pac. 881; Peasley v. Puget Sound Tug & Barge Co., supra; Newell, Malicious Prosecution, 397.
Plaintiff alleged he was brought before defendant Masters, a court commissioner, after a complaint signed by the defendants, other than Masters, had been filed; that Masters neither adjudged him insane nor committed him to an institution; that, nevertheless, plaintiff was placed in Western State Hospital. In theory, the complaint follows the one set forth in Dedrick v. Durham, 136 Wash. 265, 239 Pac. 385.
Attached to the complaint was an instrument signed by defendant Masters, as court commissioner, which read, in part, as follows:

"COMMITMENT

"Findings of Fact as to Financial Responsibility, and Judgment
"This matter having come regularly on for hearing before the Court this day in the matter of John Henry Nichols, an insane person, and the person named in the foregoing complaint, and the Court having summoned Jennings Felix, D.P.A., the Guardian ad litem of said insane person, ...

AND
"IT IS FURTHER ORDERED, ADJUDGED AND DECREED BY THE COURT that until said insane person shall be discharged from the hospital for the insane to which he has been committed, to-wit: the Western State Hospital for the Insane, (a) the guardian of such insane person, (b) the husband, wife, or father and mother, or child or children respectively of such insane person, shall pay...
"DONE IN OPEN COURT THIS 7th DAY OF September, 19__.
                                        "A.G. Masters
                             "Superior Judge, Court Commissioner"
                                                  (Italics ours.)
[3, 4] We think this instrument constitutes a judgment that plaintiff was, on September 7, 1950 (the year being supplied by an allegation in the complaint), declared insane *839 and committed to Western State Hospital. Plaintiff relies upon the record in the insanity proceedings to state a cause of action. The commitment refutes the legal effect of the allegations of the complaint that plaintiff was neither adjudged insane nor committed under the judgment. For the purpose of the demurrer, this conflict must be resolved in favor of the facts disclosed by the exhibit. If there is a conflict between the allegations of a pleading and an exhibit attached thereto, the latter will govern where the exhibit is the foundation of the pleading. Clark v. Cross, 51 Wash. 231, 98 Pac. 607; Turner v. Tjosevig-Kennecott Copper Co., 116 Wash. 223, 199 Pac. 312. Thus the complaint alleges that the proceedings did not in fact terminate in plaintiff's favor. Hence the complaint does not state a cause of action.
With reference to the reason for the rule, we said, in MacEachern v. MacEachern, supra:
"`The reason for the rule is apparent. Until a complaining party has shown that the action against him was unsuccessful, he has not shown that he has suffered any damage, and if he were permitted to sue before he had won the first suit, he might secure a recovery for the bringing of an action which the court entertaining such cause found to be well brought.'"
Plaintiff attempts to avoid the effect of the judgment of commitment by alleging (a) that the court commissioner had no jurisdiction to commit him because the statute (Rem. Rev. Stat., § 85(g) [P.P.C. § 107-3]) authorizing court commissioners to conduct insanity hearings violates Art. IV, § 23, of the state constitution; and (b) that the court had no jurisdiction of his person at the hearing because no statutory notice was given, a proper attorney was not appointed for him, and he was denied means of compelling the attendance of witnesses.
[5] There is no merit to plaintiff's first contention. The constitution itself (Art. IV, § 23) authorizes the appointment of court commissioners "to perform such other business connected with the administration of justice as may be prescribed by law." In Howard v. Hanson, 49 Wash. 314, 95 Pac. 265, we held that the legislature had power to *840 add to the duties of the court commissioner specifically enumerated in the constitution, subject to the restriction that such powers shall be connected with the administration of justice. By statute (Laws of 1909, chapter 124, § 2(g), p. 419; Rem. Rev. Stat., § 85 (g)) the legislature conferred upon court commissioners the power:
"To hear and determine all applications for the commitment of any person to the hospital for the insane, with all the powers of the superior court in such matters: Provided, That in cases where a jury is demanded, same shall be referred to the superior court for trial."
The power so conferred is "connected with the administration of justice." See State ex rel. Lockhart v. Claypool, 132 Wash. 374, 232 Pac. 351. Defendant Masters, as court commissioner, acted under valid, constitutional authority.
Plaintiff's second contention is also without merit, for two reasons: The assigned errors do not go to the jurisdiction of the court commissioner in the insanity proceedings; and they cannot be reviewed in this action, for to do so would constitute a collateral attack upon the judgment.
[6, 7] There is a distinction between a court acting without jurisdiction, and acting in excess of its jurisdiction. A judgment entered without jurisdiction is void; one entered in excess of jurisdiction is not void but is subject to direct attack pursuant to the statute. In re Ellern, 23 Wn. (2d) 219, 160 P. (2d) 639. When the complaint was filed charging that plaintiff was insane, and he was taken into custody, the court acquired jurisdiction of his person and of the subject matter involved. In re Ellern, supra; In re Higdon, 30 Wn. (2d) 546, 192 P. (2d) 744. The defects alleged to inhere in the insanity proceedings, which are admitted for the purpose of the demurrer, are not acts which prevented jurisdiction from attaching or deprived the court of jurisdiction. They were, at best, if true, matters which would have enabled plaintiff to attack the judgment directly pursuant to statute.
[8] It is thus apparent that any attempt on plaintiff's part to here attack the validity of the insanity proceedings *841 is a collateral attack upon the judgment of commitment and will not lie. We so held in MacEachern v. MacEachern, supra, and in Dedrick v. Durham, supra.
The judgment is affirmed.
MALLERY, HILL, GRADY, and DONWORTH, JJ., concur.
NOTES
[1]  Reported in 239 P. (2d) 349.
