The questions raised by the demurrers, as well as the errors complained of on the trial, are so intimately connected as to be practically indivisible. We shall treat-them together, for they are thus argued by counsel for both sides. Counsel for defendant, in their brief state: “The questions involved, broadly stated, are three. First, was the bond taken such an one as the act of 1916 required? Second, was mandamus the proper remedy.in the ease at bar? Third, mandamus being the proper remedy and *858tlie petition having set out a case requiring the issuance of the writ, is the judgment of the court, ordering plaintiffs in error to levy a tax to pay the debt, error?”
Was the bond such as the act of 1916 required? There can be no question that this inquiry must be answered in the negative. Section 1 of the act of 1916, so far as relates to the nature of bonds required thereby, is as follows: “No contract with this State, a county, municipal corporation, or any other public board or body thereof, for the doing of any public work, shall be valid for any purpose, unless the contractor shall give bond, payable to the State or other body contracted with, with good and sufficient surety, for the use of the obligee and of all persons doing worlc or furnishing shill, tools, machinery, or materials under or for the purpose of such contract, conditioned for the completion of the contract in accordance with its terms, for saving the obligee free from all costs and charges that may accrue on account of the doing of the work specified, for the payments as they become due of all just claims for work, tools, machinery, skill, and materials furnished by persons under, or for the purpose of, such contract, and for a com-pliance with the laws appertaining thereto.” This court, in American Surety Co. v. Small Quarries Co., 157 Ga. 33 (120 S. E. 617), ruled: “Where a bond was given by a contractor for the doing of public work, payable to a county of this State, with a compensated bonding company as surety, in such terms as are stated in the question propounded by the Court of Appeals, one who furnished materials to the contractor to be used, and which were used, in the performance of his contract with the county can not maintain an action therefor in his own name against the principal and' surety on the bond, by virtue of the provisions of the act approved August 19,1916 (6a. Laws 1916, p. 94).” In the case before us, as in that cited, the italicized words were omitted from the bond; and hence the provisions of sections two and four of the act of August 19,1916 (6a. Laws 1916, p. 94), as applicable to the requirements of section 1, especially where the facts are identical, have already been construed by this court. In delivering the opinion of the court in the case cited, Mr. Justice 6ilbert said: “We think that the omission of the language italicized above from the face of the bond constituted a substantial variance from the 'manner and form’ required under the act of 1916. Construing the bond strictly, as we *859are compelled to do, under § 3540 of the Civil Code of this State, quoted above, we are driven to the conclusion that the bond is not a statutory bond in compliance with the act in question; and therefore the Quarries Company could not sue the surety company in their own name.”
The second question, which is whether mandamus was the proper remedy, is not so easily answered, if we consider all of the expressions contained in the various rulings of the courts in deciding various phases of the matter in the many decisions which have been delivered as to the propriety of proceeding by mandamus in particular cases. However, there are certain general principles with regard to mandamus which are universally recognized. Mandamus is a drastic remedy. In general it applies only to public officers, and is available only when there is no other remedy. Mandamus can not be applied as a remedy to compel an act not authorized by law. Mandamus will not be granted where the absence of the right would render the proceeding nugatory. Some of the principles which must control the question as to whether mandamus was applicable as a remedy in the present case have'been distinctly ruled by this court. In Powell v. Hall Hardware Co., 156 Ga. 614 (119 S. E. 595), we held that where there was no proof that the school district was one in which the levy of a local school tax was authorized, it was error to grant a.mandamus absolute to compel the levy of a tax under section 129 of the code of school laws (Acts 1919, p. 341)., In the present case there is no allegation or proof that the Eaceville School District of Decatur County is one which is authorized by law to levy a local school tax. In the case of Powell, supra, the court unanimously held that the levy of a tax was not involved or passed upon in the case of Ty Ty Consolidated School District v. Colquitt Lumber Co., 153 Ga. 426 (112 S. E. 561), inasmuch as it was not a proceeding by rria.urla.Trms to compel the levy of a tax. Hnder the rulings in this case we are of the opinion that the court erred in not sustaining the demurrer, and also erred in making the mandamus absolute.
The third question assumes mandamus to be the proper remedy, and that the petition set out a case requiring the issuance of the writ; and hence, in view of our holding as to the second question propounded by the defendant in error, the question becomes irrelevant and immaterial in the decision of the case sub ¡judice. For the protection of those who may furnish “skill, tools, *860machinery, or materials,” provision is made in the act of 1916 (Acts 1916, p. 94) by requiring all contracts “for the doing of any public work,” such as mentioned in the preceding divisions, to give a bond in manner and form as therein' specified, which shall be for 'the use “of all persons doing work or furnishing skill, tools, machinery, or materials under or for the purpose of such contract. Under the foregoing provision of law suits for the recovery of the value of work, material, etc., furnished to contractors constructing public buildings must be brought upon the contractor’s bond in the name of the body contracted with, “for'the use of” the person who ■furnished skill, labor, or materials of any kind. To this effect was our holding in American Surety Co. v. Small Quarries Co., supra. In this case the party furnishing the material sought to apply the provisions of the law as to the foreclosure of materialmen’s liens. It is very plain that the legislature has excluded, by the passage of the act of 1916, all strictly public buildings from the operation of the-lien laws. This classification, the placing of public buildings in a class distinct and apart from private buildings, was a reasonable exercise of a constitutional power on the part of the General Assembly. The exercise of the power seems to be based upon the sound public policy of diminishing litigation and of keeping public boards, especially those charged with educational interests, out of lawsuits. - On the'other hand, as seems to me, the act of 1916 provides a protection to those who furnish either labor, tools, or materials in construction of public buildings a remedy at least as effective as is afforded by the foreclosure of a lien in an instance where such materials, etc., are furnished not directly to the owner but to a building contractor.
Mandamus can not compel a public officer to do any act upon the assumption that the performance of the act which he is commanded to do is a public duty. Consequently, in an action brought to compel by mandamus trustees of a.district school to levy a tax, it must be plainly and distinctly alleged and proved that the school district in and for which said trustees has been chosen is a local district in which the levy of the local tax sought to be enforced by mandamus is authorized by law. It is strongly insisted, however, that for every wrong the law supplies a remedjo The writer concedes this beneficent proposition to the utmost limit. The law should and does afford a redress for every wrong, even going so far as to pro*861vide: “A superior court has full power to mould .its decrees so as to meet the exigencies of each case.” Civil Code (1910), § 5426. However, the law makes few, if any, mistakes, and carefully considered judgments of the courts, upon careful examination, will 'disclose that their judgments are generally based upon principles and rendered in obedience to rules without which neither law nor order could be preserved. In the present case, as in all others, the contractor who furnished material in*constructing the school building for the Faceville School District must be presumed to know the law. Under the undisputed evidence in the case the contractor to whom the defendant in error furnished the material had not given the bond required by an act of the General Assembly designed expressly to protect every person “doing work or furnishing skill, tools, machinery, or materials under or for the purpose of such contract.” It was the duty of this materialman to have looked first to his Qwn safety. If, in the exercise of ordinary care, he had not furnished the material until he had examined the bond given by the contractor and had not supplied this material unless or until a proper bond had been given, he would have sustained no loss. Negligence is not one of the rights protected by law. As to this feature of the case it does not differ from the one in which I assume that A is the agent of B, without assuring myself of the existence of such facts as are necessary to create an agency. A is insolvent; B is amply solvent. Upon my inference of agency, based upon insufficient facts, I allow him to create a large indebtedness which I charge to B as principal, merely stating that the various articles were delivered to him through his agent A. If afterwards it develops that B had never in fact authorized A to act as his agent, and if by reason of A’s insolvency my claim is uncollectible, I have no remedy. In such a case the maxim that no man is permitted to take advantage of his own wrong would preclude even a suspicion that I had suffered a wrong at the hands of B. Having reached • the conclusion that the bond (which by law is indispensable to a legal' contract in a case where public authorities are contracting in behalf of any of the municipal and subordinate subdivisions specified in the act of 1916, supra) is void so far as the defendant in error is concerned, the contract, so far as the latter is concerned, affords the defendant in error no cause of action in any proceeding • *862to recover in this case against the Trustees of the Eaceville School District. Judgment reversed.
All the Justices concur, except