Any person who sustains an injury to his person or property by reason of any road or bridge under the control of the county court or any road, bridge, street, alley or sidewalk in any incorporated city, town or village being out of repair due to the negligence of the county court, incorporated city, town or village may recover all damages sustained by him by reason of such injury in an action against the county court, city, town or village in which such road, bridge, street, alley or sidewalk may be, except that such city, town or village shall not be subject to such action unless it is required by charter, general law or ordinance to keep the road, bridge, street, alley or sidewalk therein, at the place where such injury is sustained, in repair. If it is not so required, the action and remedy shall be against the county court. When judgment is obtained against the county court, such court shall at the time of the laying of the next annual levy, levy upon the taxable property of the district in which such injury is sustained a sufficient sum to pay such judgment with interest and costs, and the costs of collecting the same, and when it is obtained against the city, town or village the proper municipal authorities thereof shall lay such levies at the time of levying the next annual levy on the property subject to taxation in such city, town or village. In case of a failure by either so to do, or to pay the judgment as required by law, the circuit court of the county for which such county court acts or in which such city, town or village or the major portion of the territory thereof is located shall compel the laying of such levy, or the payment of such judgment, or both, by mandamus.
W. Va. Code § 17-10-17