The opinion of the court was delivered by
Beasley, Chief Justice.The defendant in error was the owner of certain clay and spar banks located in Perth Amboy. In the fall of 1887 the plaintiffs undertook to mine this clay and spar. The terms were that, according to the plaintiffs’ own statement, they were to mine and deliver at a certain dock for shipment the clay and spar, which were to be shipped immediately upon delivery, and were to be then paid for at a certain designated rate, the agreement further providing that if there was a surplus stock at the “ end of the shipping season,” it was to be paid for at a certain fixed and reduced rate. The plaintiffs had the possession of the mines and worked them at their own discretion. This business was thus carried on until, on the 19th of March, 1891, the plaint*475iffs received a written notice from the defendant “ not to dig any more clay or minerals from his farm,” and thereupon they ceased to do so. Before they received this notice the plaintiffs had removed, at a considerable expense, the super-incumbent earth from two of the mines, and they claimed that this preparation for mining was useless by reason of the termination of their contract on the part of the defendant.
It is for the expense incurred in this respect that this suit is brought.
The legal question to be decided in this case is presented in this aspect.
The declaration contains nothing but the common counts, and, as the counsel of the plaintiff at the trial, refused to amend, and his client was thereupon nonsuited, the inquiry is whether, on the assumption that a legal cause of action existed, it can be enforced in this mode.
It would seem plain that, unless the contract between these parties has been illegally terminated by the defendant, no wrong, in a legal' point of view, has been committed. The agreement itself has not set any limit .to its continuance, and if we were to conclude, as suggested in the brief of the counsel in error, that either party could at will, at any time, declare it to be at an end, it is not apparent how the exercise of a granted power could afford a basis for an action at law. FTo matter what the • resulting hardship might be, neither party could complain, as it would be nothing more than the product of his own stipulation.
And, on the other hand, if we postulate that the act of the defendant in ordering the plaintiffs to cease mining was unlawful, the difficulty of permitting a recovery on that ground is, we think, insuperable. On the assumption of an act of this character, the ordinary case is presented of a party who is prevented by the person with whom he contracts from the full performance of his contract after he has in part executed it. In such junctures, the law applies the most satisfactory of all rules — that is, that the person wronged shall be recompensed, as near as may be, for the entire loss.
*476In the case before us, this principle is rejected by the plaintiffs, who seek to recover the costs they have incurred in removing the earth in question, without reference to the question whether, if the contract had been fulfilled by them, they would have been compensated for such outlay. It was altogether contingent whether the plaintiffs would gain or lose by the labor thus expended, for the result in that particular could be ascertained only when it should have been discovered that the mines thus stripped contained such a quantity of clay that, at the prices fixed by the contract, the plaintiffs would have realized a sum sufficient to repay to them the cost of its exhumation and also the cost of this removal of the surface soil. By force of their contract, therefore, it was uncertain whether the plaintiffs, when they did this work, would gain or lose by its performance, and their effort in this suit is to eliminate that uncertainty and to recover for it at a price never contemplated by themselves nor by the other contracting party. It has not been observed that such a claim has ever been sanctioned by any legal tribunal. In all such cases the action must be founded on the contract, as the damages that have in fact been sustained, and which are those only that the law permits to be recovered are entirely unliquidated.
The case of Gilbert, Administrator, v. Maynard, 5 Johns. 85, is much in point. The facts were these: A having agreed by parol with B for the purchase of certain lands, paid part of the purchase-money, and, entering into possession, made certain improvements. In this posture of things, A died, and his administrator tendered the residue of the purchase-money, which B refused to accept, but took possession of the land and sold and conveyed it to a third person. A suit was then brought by the administrator to recover the money paid and for work and labor of the intestate in improving the land. The court declared that, as the contract was rescinded, the plaintiff was entitled to the money so paid, but that there could be no recovery by way of compensation for the improvements, as there was no express or implied agreement to *477pay for them. By the rescission of the contract, all right to compensation for the improvements was waived.
In regard to the legal principle thus exemplified, this case does not seem distinguishable from the present one.
Indeed, in this class of eases in which one party has been prevented from completing his contract by the illegal action of the other party, the measure of damage is almost universally the loss that has resulted to the innocent party from the entire transaction. This was the rule very clearly defined in the case in this court of Kehoe v. Mayor, &c., of the Borough of Rutherford, 27 Atl. Rep. 912, in which it was said that the party injured “ was to lose nothing, but, on the other hand, he was to gain nothing by the breach of the contract.” In this case, as in the present one, the attempt was to recover for the cost of a certain part of the work contracted for, on the ground that the agreement was rescinded, and the court repudiated the proposition and declared that the general principle in such instances was “ that when it can be determined what, according to the contract, the plaintiff would receive for that which he has done, and what profit he would have realized by doing that which, without fault, he has been prevented from doing, then these sums become the legal, as they are the just, measure of his damages.”
It will be observed that this reasonable rule was of easy application to the present controversy, for, according to the contract, the plaintiffs were to be paid at a certain rate on the spar and clay raised by them, and as they offered to show that such minerals and earth had, since their abandonment of the mines, been taken out by the defendant, there could have been no difficulty in the ascertainment of their damages by reason of the breach of the contract on the part of the defendant, if any such breach existed.
From these decisions and many others of the same strain .that it*is not deemed necessary to refer, we think it is obvious that the plaintiffs could not consider the contract rescinded and resort to the common counts.
*478With respect to the cases cited in the brief of the counsel of the plaintiffs, it is sufficient to say that, in the view of the court, they do not apply to the case before us. Such cases belong to two well-defined categories — that is, first, where money has been paid or work done under void contracts; or, second, under contracts that have been legally rescinded, and the moneys sought to be recovered are indubitably due, without reference to the terms of the abrogated contract. Under such circumstances, the law will imply a promise to pay such sums, as they cannot by any possibility exceed the amount of the damages that result from the breach-of the contract.
As the plaintiffs at the trial exhibited no claim that could be embraced in the common counts, the nonsuit was proper and the judgment must be affirmed.
From what has been said in the expression of the foregoing view, it is not to be inferred that the court considers it plain that the act of the defendant in terminating the contract in question was justifiable in law. That is a matter dependent on circumstances which it would seem have not been fully developed. The agreement appears to indicate that it was to .continue for the “season,” for it provides for a payment of part of the clay exhumed that should remain unshipped at the close of the season. -It may be that such a contract could not be terminated by either party except upon reasonable notice. But as this matter is not before us, no opinion is expressed with respect to it.