delivered the opinion of the court.
A motion was made by the defendant in error to dismiss the writ of error awarded in this case.
*603The ground of the motion was that, after the judgment appealed from was rendered and before the writ of error was. applied for, the controversy between the plaintiff in error and his opponent, as to the 'title to the office of Attorney for the Commonwealth for Appomattox county was determined on its merits by the County Court of the said county, in a proceeding instituted to that end in the manner provided by law for contesting the election of county officers, and that the question presented by the writ of error thereby became an extinct issue. The motion was supported by affidavits, and a certified copy of the record of the proceeding in the County Court, which sustained the contention of the defendant in error.
The plaintiff in error did not attempt to controvert the fact that such contest had been made, and decided in favor of his opponent, but asserted that, if this were true, it was not competent to show it by extrinsic evidence; that this court could only consider the transcript of the record of che judgment appealed from; and that if from that it appeared that the judgment was erroneous, he was entitled to have it reversed.
"Whenever it appears or is made to appear that there is no actual controversy between the litigants, or that, if it once existed, it has ceased to do so, it is the duty of every judicial tribunal not to proceed to the formal determination of the apparent controversy, but to dismiss the case. It is not the office of courts to give opinions on abstract propositions of law, or to decide questions upon which no rights depend, and where no relief can be afforded. Only real controversies and existing rights are entitled to invoke the exercise of their powers.
When it appears from the record, or from matters of which courts may take judicial notice, that the controversy that once existed has terminated by lapse of time, the appellate court will dismiss the writ of error or appeal. Shumate v. Spilman, 10 Va. Law Journal 443,; Mills v. Green, 159 U. S. 651; and Cutcomp v. Utt, 60 Iowa 156.
*604And when it does not so appear that there is no controversy ■existing between the litigants, or that, if it once existed, it has been settled or ceased to exist, it results from the necessity of the case, in order that imposition upon judicial tribunals may "be prevented, that it may be shown by extrinsic evidence, and, being so shown, the writ of error or appeal will be dismissed. Lord v. Veazie, 8 How. 251; Cleveland v. Chamberlain, 1 Black 419; Dakota County v. Glidden, 113 U. S. 222; Little v. Bowers, 134 U. S. 548; California v. San Pablo, &c. R. Co., 149 U. S. 308; People v. Burns, 78 Cal. 645; and Watson v. Watson, 4 Rand. 611.
In Sherman v. Com., 14 Gratt. 677, it was permitted to be shown that the plaintiff in error, since the judgment of conviction, had escaped from custody, and was at large; whereupon this court ordered that the writ of error be dismissed, unless it should be made to appear, by a certain day, that the plaintiff in error was in the custody of the proper officer of the law. And, in Leftwich v. Com., 20 Gratt. 116, it appearing to the ■court after the decision of the case that the plaintiff in error had escaped from custody, the court stated that if it had been informed of this fact before hearing and'deciding the case, it would have followed the same course that was pursued in Sherman v. Com., supra.
The record and affidavits filed in support of the motion to dismiss the writ of error establish that the controversy which •existed in regard to the title to the office of Attorney for the Commonwealth, at the time the judgment appealed from was rendered, was subsequently judicially determined by a court of ■competent jurisdiction, from whose judgment no appeal was taken, and the same remains unreversed, and in full force, so ■that the matter in dispute is not open to a further contention. If this court were to reverse the judgment, which it is here .sought to review, it could not result in any effectual relief to the plaintiff in error.
*605It therefore follows that the writ of error must he dismissed at the costs of the petitioner, as was done in the case of Shumate v. Spilman, cited above.
Writ of error dismissed.