
228 Cal.App.2d 283 (1964)
39 Cal. Rptr. 443
HARRY DAUM et al., Petitioners,
v.
THE SUPERIOR COURT OF SUTTER COUNTY, Respondent; YUBA PLAZA, INC. et al., Real Parties in Interest.
Docket No. 10898.
Court of Appeals of California, Third District.
July 1, 1964.
*284 Steel & Arostegui and Terence J. Keeley for Petitioners.
No appearance for Respondent.
Laughlin & Craig and Robert E. Laughlin for Real Parties in Interest.
SCHOTTKY, J.
Petitioners seek a writ of mandate to compel the respondent court to permit them to file a second amended complaint in an action on a contract.
On September 21, 1960, petitioners and the real parties in *285 interest entered into a contract whereby petitioners were to act as the exclusive agent in the negotiation and procurement of long-term leases of commercial sites in Yuba Plaza Shopping Center, a new development under the ownership of the real parties in interest. Under the contract, payment for petitioners' performance was conditioned on the accrual of Yuba Plaza's right to payment of the first rental payment under each of the leases and the procurement, whether by petitioners or not, of a construction loan and long-term loan to cover the on-site construction costs of the shopping center.
In July 1963 petitioners filed a complaint against Yuba Plaza et al., for the amount owing as a result of petitioners' performance in negotiating certain long-term leases and obtaining a commitment for a long-term lease.
The superior court in January 1964 sustained defendants' demurrer "without leave to amend until such time as the conditions precedent in the contract between the parties have occurred." Petitioners made a motion to vacate this order and for leave to file a second amended complaint based on anticipatory breach (and as a second cause of action  for services rendered). Said proposed second amended complaint pleads the making of a contract between the petitioners and the aforementioned defendants (paragraph V); that the petitioners have performed all the conditions and all things to be done and performed up to the time of repudiation and were ready, willing and able to complete their performance (paragraph VI); that the defendants unequivocally repudiated this contract and wrongfully discharged petitioners from performance thereunder (paragraph VII); and finally that subsequent to said repudiation the defendants have never retracted this repudiation (paragraph VIII); and that petitioners have been damaged (paragraph IX).
Petitioners' motion was denied by the court and they seek a writ of mandamus from this court.
We must first consider whether mandamus is the proper remedy. Defendant Yuba Plaza states that the general rule is that to test the validity of an order sustaining a demurrer without leave to amend a judgment of dismissal should be entered and the plaintiff can then appeal from the judgment. (Berri v. Superior Court, 43 Cal.2d 856 [279 P.2d 8].)
[1] In the instant case the argument of Yuba Plaza is based on the theory that the court's order was simply an order sustaining a demurrer without leave to amend, but the order here is not a true order sustaining a demurrer without *286 leave to amend. Here, upon petitioners showing that the condition precedent had occurred, it appears that the court would permit petitioners to reinstate their claim. As such, it is not a final order but an interlocutory order which is neither final for purposes of appeal nor final in the trial court. (3 Witkin, Cal. Procedure, Judgment, § 3, pp. 1874-1875.)
Section 1086 of the Code of Civil Procedure provides that the writ of mandamus will issue "in all cases where there is not a plain, speedy, and adequate remedy, in the ordinary course of law." (Sharff v. Superior Court, 44 Cal.2d 508 [282 P.2d 896, 64 A.L.R.2d 494].) [2] Case law has established that mandate will lie, inter alia, to control judicial discretion when that discretion is abused; and that "`In a legal sense discretion is abused whenever in the exercise of its discretion the court exceeds the bounds of reason, all of the circumstances before it being considered.'" (State Farm etc. Ins. Co. v. Superior Court, 47 Cal.2d 428, 432 [304 P.2d 13]; Hays v. Superior Court, 16 Cal.2d 260 [105 P.2d 975].)
[3] Courts should indulge in great liberality in allowing amendments to a complaint in order that no litigant is deprived of his day in court because of mere technicalities of pleading. (Saari v. Superior Court, 178 Cal. App.2d 175, 178 [2 Cal. Rptr. 856]; Youngblood v. City of Los Angeles, 160 Cal. App.2d 481 [325 P.2d 587].) [4] Although the right to amend should be denied if a change is made in the liability sought to be enforced against the defendant (Klopstock v. Superior Court, 17 Cal.2d 13, 20 [108 P.2d 906, 135 A.L.R. 318]; Youngblood v. City of Los Angeles, 160 Cal. App.2d 481, 492 [325 P.2d 587]), or if it appears to a certainty that no basic right of action can possibly exist or no relief can possibly be granted (Miller v. McLaglen, 82 Cal. App.2d 219, 228 [186 P.2d 48]), "where `the facts stated in the complaint show that the plaintiff is entitled to damages of some sort, it is not a fatal error that the pleader has mistaken the rule by which such damages should be determined'" and an amendment should be allowed. (Eatwell v. Beck, 41 Cal.2d 128, 136 [257 P.2d 643]; Bice v. Stevens, 136 Cal. App.2d 368, 374, 379 [289 P.2d 95].)
In the case at bench the petitioners are not attempting to introduce an entirely new cause by the proposed second amended complaint but merely propose a change of theory in their action against defendants. Petititioners' first amended complaint alleges a contract, full performance on their part, and a breach thereof in that upon demand defendants failed *287 and refused to pay the money due them for their performance rendered pursuant to the contract. [5] A plaintiff, however, cannot enforce the defendant's obligation unless the plaintiff has performed the conditions precedent imposed upon him (Civ. Code, § 1439; see also Code Civ. Proc., § 457); accordingly, he must allege either performance of the conditions precedent (Fenn v. Pickwick Corp., 117 Cal. App. 236, 242 [4 P.2d 215]) or an excuse. (2 Witkin, Cal. Procedure, Pleading, § 257, pp. 1232-1233, § 259, pp. 1234-1236.) [6] Here there were two conditions included in the contract before defendants were obligated to pay. The first, the procurement of a loan necessary for the financing for the construction of the shopping center; and second, the accrual of Yuba Plaza's right to payment of the first rental payment of the leases obtained by petitioners. The first amended complaint does allege the procurement of a long-term loan for on-site construction, but there is no allegation as to the accrual of the right to the first rental payment of the leases. Thus, it was proper to sustain a general demurrer inasmuch as petitioners had not alleged the happening of the condition precedent. (See 2 Witkin, Cal. Procedure, Pleading, § 261, p. 1237.) [7a] In their proposed second amended complaint, however, there is a showing of excuse, for the proposed second amended complaint does allege an anticipatory breach, a breach by anticipatory repudiation. [8] California recognizes an action for anticipatory breach (Civ. Code, § 1440; Caminetti v. Pacific Mut. Life Ins. Co., 23 Cal.2d 94, 105 [142 P.2d 741]), and that a definite and unconditional repudiation of the contract by the promisor communicated to the promisee, being a breach of the contract, creates an immediate right of action even though it takes place long before the time prescribed for the promised performance and before conditions specified in the contract have ever occurred. (Remy v. Olds, 88 Cal. 537 [26 P. 355]; see also 4 Corbin, Contracts, § 959, p. 852.)
[7b] In pleading the repudiation of the contract by the defendants, petitioners have brought themselves within the well-recognized doctrine of anticipatory breach. In Gold Mining & Water Co. v. Swinerton, 23 Cal.2d 19, the court said at page 29 [142 P.2d 22]: "Strictly speaking, a total breach of a contract may arise in two ways, which, although different, have been frequently confused with each other. One is an anticipatory breach, or as it may be termed, a breach by anticipatory repudiation, which is necessarily total, and *288 which is of importance both with relation to an excuse for nonperformance by the promisee, the repudiation being by the promisor, and the right of the promisee to recover damages immediately for a total breach of the contract before performance by the promisor is due thereunder. By its very name an essential element of a true anticipatory breach of a contract is that the repudiation by the promisor occur before his performance is due under the contract.... A contract is totally breached and an anticipatory repudiation occurs when the promisor without justification and before he has committed a breach, makes a positive statement to the promisee indicating that he will not or cannot substantially perform his contractual duties."
Petitioners have pleaded the necessary elements in their proposed second amended complaint. The effect of the pleaded repudiation was that the injured parties, Harry Daum and Daum Development Corporation, had an election of remedies: (a) they may have waited until the time for performance and then exercised their remedies for actual breach of contract; or (b) they had the election to treat the repudiation as an anticipatory breach and sue immediately. Petitioners chose the latter course. This remedy is commented on in Atkinson v. District Bond Co., 5 Cal. App.2d 738, the court saying at page 743 [43 P.2d 867]: "... The real operation of a declaration of intention not to be bound appears to give the promisee the right of electing either to treat the declaration as brutum fulmen and, holding fast to the contract, to wait until the time for performance has arrived, or to act upon the declaration and treat it as a final assertion by the promisor that he is no longer bound by the contract, and as a wrongful renunciation of the contractual relation into which he has entered. If he elects to pursue the latter course, it becomes a breach of contract, excusing performance on his part and giving him an immediate right to recover upon it as such. Upon such election the rights of the parties are to be regarded as then culminating, and the contractual relation ceases to exist, except for the purpose of maintaining an action for the recovery of damages. [Citations.]"
The petitioners in their proposed amended complaint have pleaded the necessary elements of repudiation to exercise this election of suing immediately. They have alleged that they had performed all of the conditions up to the time of the repudiation and were ready, able and willing to complete performance pursuant to the contract except for defendants' *289 expressed unequivocal repudiation that has not been retracted, and that as a result of defendants' repudiation, petitioners have suffered damages.
We are convinced that the denial of petitioners' motion to file the proposed second amended complaint was an abuse of discretion, for as stated by this court in Saari v. Superior Court, supra, 178 Cal. App.2d 175, at page 180, citing the case of Morgan v. Superior Court, 172 Cal. App.2d 527 at page 530 [343 P.2d 62], "`While a motion to permit an amendment to a pleading to be filed is one addressed to the discretion of the court, the exercise of this discretion must be sound and reasonable and not arbitrary or capricious. (Richter v. Adams, 43 Cal. App.2d 184, 187 [110 P.2d 486]; Eckert v. Graham, 131 Cal. App. 718, 721 [22 P.2d 44].) And it is a rare case in which "a court will be justified in refusing a party leave to amend his pleadings so that he may properly present his case." (Guidery v. Green, 95 Cal. 630, 633 [30 P. 786]; Marr v. Rhodes, 131 Cal. 267, 270 [63 P. 364].) If the motion to amend is timely made and the granting of the motion will not prejudice the opposing party, it is error to refuse permission to amend and where the refusal also results in a party being deprived of the right to assert a meritorious cause of action or a meritorious defense, it is not only error but an abuse of discretion. (Nelson v. Superior Court, 97 Cal. App.2d 78 [217 P.2d 119]; Estate of Herbst, 26 Cal. App.2d 249 [79 P.2d 139]; Norton v. Bassett, 158 Cal. 425, 427 [111 P. 253.)'
"And finally, as said in the case of Vick v. Grasser, 169 Cal. App.2d 692, 701 [338 P.2d 223]: `While it is of course true that a trial court has a broad discretion in passing upon a motion to file an amended pleading and that an appellate court will not interfere with the action of the trial court unless it clearly appears that there has been an abuse of discretion, we do not believe the term "judicial discretion" is broad enough to sustain the court's order denying permission to file the second amended complaint. For as stated in Jepsen v. Sherry, 99 Cal. App.2d 119 [220 P.2d 819, 822], the discretion to be exercised in such a case is "one controlled by legal principles and is to be exercised in accordance with the spirit of the law and with a view to subserving, rather than defeating, the ends of substantial justice."'"
Furthermore, the order made by the court was really not an order sustaining the demurrer to the first amended complaint without leave to amend because it was made conditional *290 by the statement "until such time as conditions precedent in the contract between the parties have occurred." Such an order was in effect an order for the abatement of the action, and the court had no authority to make such an order. When petitioners sought permission to file the second amended complaint, as hereinbefore set forth, the court should have granted the motion. Petitioners are entitled to a writ ordering the court to permit the filing of the said proposed second amended complaint. Further proceedings are to be in accordance with the views herein expressed.
Let a peremptory writ issue as prayed for.
Pierce, P.J., and Friedman, J., concurred.
