The general tendency of the decided cases in this State is to regard a motion to dismiss or quash a proceeding as addressed to the discretion of the court; although it is distinctly held, in Farley v. Day, 26 N. H. 527, on motion to quash a writ for want of legal service, that it was not a matter’ of discretion, but that the principles of law must be applied, as in other cases.
It is, however, universally held that such motion must be seasonably made, or the defect will be regarded as waived; and, in the absence of any specific rule, what is seasonable must depend upon the sound discretion of the court; and we are not prepared to say that there may not be cases where, on account of the subject matter of the motions, the court may, in its discretion, put the party to a formal plea.
But where the defect is the want of legal service of the writ, and such defect is apparent on the record, the court, on motion, if seasonably made, will generally quash the proceeding; and as a general rule such motion will not be regarded as seasonably made, unless it be within the time limited for filing pleas in abatement. So it is held in Parsons v. Swett, 32 N. H. 87.
It is laid down in Tidd’s Pr. 90, “ That if the process be defect*431ive in point of form, or its direction, teste, or return, or tbe attorney’s name be not indorsed upon it, tbe defendant may move the court to set aside the proceedings. But he can not take advantage of any error or defect in the process, after he had appeared to it, or taken the declaration out of the office; for it is the universal practice of the court that where there has been an irregularity, if the party overlook it and take subsequent steps in the cause, he can not afterward revert back and object to it.” See, also, Corbet v. Bates, 3 T. R. 660, and other cases cited in 1 Tidd’s Pr. 90.
In accordance with our gen eral views are Eames v. Carlisle, 3 N. H. 130; Tilton v. Parker, 4 N. H. 142; Davis v. Duncklee, 9 N. H. 553 ; Chase v. Strain, 15 N. H. 541; Lowell v. Sabin, 15 N. H. 37 ; State v. Walpole, 15 N. H. 27 ; Clark v. Lisbon, 19 N. H. 286; Farley v. Day, and Parsons v. Swett, before cited; also, Andrews v. Bosworth, 3 Mass. 223; Tingley v. Bateman, 10 Mass. 343; Gould v. Richardson, 6 Pick. 369; Bennett v. Allen, 30 Vt. 684; Trafton v. Rogers, 13 Me. 315; Mathews v. Blossom, 15 Me. 400.
Where the defect is not apparent upon the record, the coui't will not take notice of it, without plea, even upon an agreed statement of facts ; as is held in Morse v. Colby, 5 N. H. 222; but if the defect be a substantial one, is apparent upon the record, and can not be cured by amendment, and is seasonably brought to the notice of the court by motion, the proceeding will ordinarily be dismissed.
In this case there was no legal service upon the principal defendant; and it is admitted that the motion to dismiss was made within the first four days of the return term; and we see nothing that calls for any exercise of judicial discretion by putting the defendant to his plea in abatement, even if such discretion existed; but it is merely the ordinary case of a defective service by which the plaintiff’s attachment is endangered. The writ must, therefore, be quashed.