
20 Cal.App.3d 807 (1971)
97 Cal. Rptr. 874
JOSEPH PURCELL, Plaintiff and Appellant,
v.
COLONIAL INSURANCE COMPANY, Defendant and Respondent.
Docket No. 37640.
Court of Appeals of California, Second District, Division Two.
October 26, 1971.
*809 COUNSEL
Minsky, Garber & Rudof and Justin M. Groshan for Plaintiff and Appellant.
Stearns & Nelson and Bruce L. Nelson for Defendant and Respondent.
OPINION
COMPTON, J.
Plaintiff Joseph Purcell appeals from a judgment of dismissal following the granting of a motion for a judgment on the pleadings.
On March 27, 1968, plaintiff filed a complaint against his former insurance carrier Colonial Insurance Co. (hereinafter defendant) seeking $100,000 in damages for "grievous mental and physical pain and nervous pain and suffering," and $3,500 in legal expenses. The pain and suffering was alleged to be the result of the defendant's failure to settle, within the limits of its policy, a claim against plaintiff for bodily injury, property damage, and wrongful death. Defendant in moving for a judgment on the pleadings urged that (1) plaintiff was not the real party in interest, having assigned his cause of action, and (2) the action was barred by the statute of limitations.
The trial court assumed that plaintiff had a cause of action but ruled that said cause of action was barred by the one-year statute of limitations applicable to personal injury actions. (Code Civ. Proc., § 340, subd. 3.)


*810 FACTUAL BACKGROUND
On June 20, 1962, the plaintiff was involved in an automobile accident near St. Louis, Missouri. The accident resulted in the death of two individuals, Barbara and Jay Reich, and injury to a third, Jeffrey Reich. A liability insurance policy issued by defendant covered the plaintiff up to $10,000 for death or injury to any one person and $20,000 for death or injury arising out of a single accident.
Subsequent to June 20, 1962, Jeffrey Reich and Lee Reich, next-of-kin of the deceased individuals, (hereinafter referred to as the "Reichs") offered to settle all claims against the plaintiff for an amount within the policy limits of $20,000. Defendant refused the offer to settle.
Thereafter, on February 25, 1965, plaintiff entered into an assignment agreement with the Reichs.
The assignment agreement was not pleaded in the complaint but was instead filed as an exhibit with the answer.
(1) The general rule is that on a motion for judgment on the pleadings as in the case of general demurrer, the court may not consider matters extrinsic to the pleading under attack. (2 Witkin, Cal. Procedure (1954) § 67, p. 1704.) Nevertheless, we judicially notice the provisions of the agreement. To fail to do so would be to ignore the pivotal factor in the proper resolution of this case. No useful or desirable end would result from such technical rigidity.
Both parties in their briefs refer to the agreement. The plaintiff asks us to consider the agreement in aid of his pleading. Thus there has been compliance with sections 452 and 453 of the Evidence Code. On the other hand we can treat the matter as a summary judgment. In that context the effect of the assignment presents a question of law which, if resolved against plaintiff, would be conclusive and leave no room for triable issues of fact.
That agreement after referring to the pendency of the action (No. 819818) brought by the Reichs against plaintiff and the refusal of defendant to settle, provided that plaintiff assigned to the Reichs "any and all causes of action which he has or may have, now or in the future, against Colonial with respect to all matters arising out of said accident and the claims incident thereto, ..." (Italics added.) Pursuant to another provision of the agreement, plaintiff paid $12,500 to the Reichs and in turn obtained a release.
*811 The agreement further provided in part as follows: "3. It is expressly contemplated by Assignees that they will press said action No. 819818 to judgment and then seek to collect the amount of such judgment from Colonial. As assignees of the cause of action described in paragraph 1, above, they shall have in their sole discretion the right but not the duty to bring and prosecute a second action, against Colonial, to enforce such cause of action. Full control over such cause of action shall be in Assignees, who may assert or not assert it, settle or not settle it, as they see fit, all without notice to or concurrence of Assignor. 4.... Therefore, should Assignees at any time succeed in collecting payments from Colonial in excess of $20,000.00 (exclusive of interest, costs and property damage claims), whether through judgment, settlement or otherwise, then Assignor shall receive a refund from Assignees of 50% of any such excess until the amount of such refund equals $12,500.00, without interest."
On September 1, 1965, a judgment in an aggregate sum of $35,000 or $15,000 in excess of the policy limits was entered in favor of the Reichs and against plaintiff. In that action the trial court applied Missouri law which limited the amount of damages. The Reichs appealed.
In the case of Reich v. Purcell, 67 Cal.2d 551 [63 Cal. Rptr. 31, 432 P.2d 727], our Supreme Court held that the Missouri limitations were not applicable. Pursuant to stipulation between the Reichs and plaintiff the judgment was increased to $55,000. The judgment was final on November 29, 1967. Subsequently, plaintiff commenced this action and the Reichs initiated a separate action against defendant.

IS PLAINTIFF THE REAL PARTY IN INTEREST?
The question of who is the real party in interest turns upon whether plaintiff was at the time of the assignment possessed of a single cause of action or two causes of action, one for a personal tort and one for breach of contract.
Beginning with Brown v. Guarantee Ins. Co., 155 Cal. App.2d 679 [319 P.2d 69], this court viewed the cause of action for a wrongful failure to settle as ex-delicto but essentially arising out of the contract of insurance. In terms of assignability, it was given the attributes of a cause of action based on contract.
Comunale v. Traders & General Ins. Co., 50 Cal.2d 654 [328 P.2d 198], (citing Brown with approval) stated that, "Although a wrongful refusal to settle has generally been treated as a tort [citations], it is the rule that where a case sounds both in contract and tort the plaintiff will *812 ordinarily have freedom of election between an action of tort and one of contract. [Citation.]" (P. 663.)
The result of Comunale was, as to the issue of the statute of limitations, the application of the four-year statute on obligations arising out of written contracts. (Code Civ. Proc., § 337, subd. 1.)
As to the issue of assignability the court held that whether that cause of action is described as ex contractu or ex delicto, it is clearly assignable.
Section 954 of the Civil Code provides: "A thing in action, arising out of the violation of a right of property, or out of an obligation, may be transferred by the owner...."
Crisci v. Security Ins. Co., 66 Cal.2d 425 [58 Cal. Rptr. 13, 426 P.2d 173], while citing Comunale with approval, recognized that in a case of a wrongful refusal to settle, the plaintiff who suffered mental stress could recover damages therefor in addition to compensation for pecuniary loss. It appears that in Crisci, there had been an assignment by Mrs. Crisci of the cause of action. On the other hand the recited facts speak of an award in her favor for $91,000 because of the judgment in excess of the policy limits. This in addition to damages for the emotional distress. In any event the issue of the assignment does not appear to have been raised.
While Crisci held that the cause of action did not sound solely in contract it is clear that the court considered the cause of action to be rooted in the contract of insurance, as demonstrated by the following language at page 434: "Among the considerations in purchasing liability insurance, as insurers are well aware, is the peace of mind and security it will provide in the event of an accidental loss, and recovery of damages for mental suffering has been permitted for breach of contracts which directly concern the comfort, happiness or personal esteem of one of the parties. (Chelini v. Nieri, 32 Cal.2d 480, 482 [196 P.2d 915].)" (Italics added.)
Neither Comunale nor Crisci suggest the existence of two causes of action. Instead they refer to "the action for wrongful refusal to settle" and declare that the plaintiff has an election to proceed in either contract or tort. If two causes of action existed the court's reference to an election would be redundant.
When Comunale and Crisci are read together they describe a single cause of action for a wrongful failure to settle within policy limits, which cause of action can give rise to two forms of damages: (1) Compensation for pecuniary loss, and (2) general damages for mental distress.
*813 The assignability of this cause of action stems from its contractual origin and its primary relation to financial damage.
In the case at bar the plaintiff does not seek to recover for pecuniary loss resulting from a judgment in excess of the policy limits. He previously assigned that cause of action to the Reichs. Here he seeks only the damages for pain and suffering.
Plaintiff is anxious to concede that the one-year statute of limitations applies and to argue only the point at which the cause of action accrued, because if a cause of action remains available to plaintiff it must sound in tort and have been unassignable else he would by virtue of the assignment fail to qualify as the real party in interest. Does such a cause of action here subsist? We think not.
(2) While the general rule is that causes of action for injuries to person and property are separate (29 Cal.Jur.2d Judgments, § 259, p. 226; 3 Witkin, Cal.Procedure (1963) Judgments, § 64(b)), all damages for a single breach of contract must be recovered in one action. (Holmes v. David H. Bricker, Inc., 70 Cal.2d 786 [76 Cal. Rptr. 431, 452 P.2d 647].)
Holmes involved a written warranty of the safe mechanical condition of an automobile. Plaintiffs, alleging a breach of the warranty, obtained a judgment for personal injuries. In a second action brought to recover for property damage the court held that a single breach of an express warranty resulting in injury to both person and property constitutes a single cause of action.
The plaintiff's complaint here is premised essentially upon the defendant's breach of a duty owed to plaintiff under the contract of insurance. The claim assigned to the Reichs rested upon the same breach.
Even if the actions of defendant are viewed as a tortious breach of the duty owed to plaintiff, that duty was created by contract and is analogous to the claim based on the warranty in Holmes.
(3) "`Compensatory damages do not constitute a plaintiff's cause of action. His cause of action arises from the wrong inflicted on him, and for the infliction of that wrong he is allowed an award of such damages.... [A]n entire claim arising either upon a contract or from a wrong cannot be divided and made the subject of several suits.'" (Reichert v. General Ins. Co., 68 Cal.2d 822, 832 [69 Cal. Rptr. 321, 442 P.2d 377].) (Italics added.) Holmes and Reichert were both decided after Crisci and appear to answer the question which Crisci did not really confront.
Most recently, in Fletcher v. Western National Life Ins. Co., 10 Cal. *814 App.3d 376 [89 Cal. Rptr. 78], the court was dealing with an insurer's wrongful conduct in threatening cancellation of and withholding benefits under an accident and sickness policy. In concluding that the wronged insured was entitled to damages for both pecuniary loss and emotional distress, the court stated at page 402: "A rule placing the emphasis where it belongs and permitting recovery of all proximately caused detriment in a single cause of action is more likely to engender public respect for and confidence in the judicial process...." (Italics added.)
(4) Thus we conclude that plaintiff here was possessed of a single and indivisible cause of action against defendant. He assigned that cause of action to the Reichs in clear and unequivocal language. In so doing the plaintiff simply waived any claim for purely personal damages that, relying on Crisci, he might have been able to recover had he brought the action himself. He could not split the cause of action.
This result is not anomalous. The Reichs are in no different position than would be plaintiff's executor had plaintiff died prior to judgment. Probate Code section 573 as amended in 1961 provides the while a cause of action survives a decedent, damages for pain and suffering do not.
If plaintiff desired to retain his claim for emotional distress he could very easily have contracted with the Reichs to pay to them all or any part of a judgment that he might recover, a procedure similar to a contingency fee contract between an attorney and his client. Thus he could have recovered all proper damages without submitting the defendant to a multiplicity of lawsuits such as has been done here. Plaintiff did not do that, he assigned his cause of action.
An action must be prosecuted in the name of the real party in interest. (Code Civ. Proc., § 367.) That person, by virtue of the assignment, was the Reichs and not the plaintiff.

THE STATUTE OF LIMITATIONS
Since we have concluded that the plaintiff had no cause of action which he could pursue, the issue of the statute of limitations is moot.
(5) In any event, assuming a cause of action for mental suffering existed apart from a cause of action for pecuniary loss, the wrong occurred when the defendant refused to settle in June of 1962. The damages for that mental suffering were fixed as to plaintiff on February 25, 1965, when the agreement with the Reichs was consummated. His anxiety resulting from possible exposure to greater financial liability was at an end. Nothing which could occur in the litigation with the Reichs could have affected his position. *815 It is clear that even taking this latter date for the point at which the statute of limitations started to run, the action would be barred.
(6) Treating the cause of action as indivisible, as we have done, the statute would of course commence to run only when the total damages were determinable, i.e., when the amount of the pecuniary loss was finally fixed. The trial court's action in ordering the dismissal was correct.
The judgment is affirmed.
Roth, P.J., and Herndon, J., concurred.
Appellant's petition for a hearing by the Supreme Court was denied December 23, 1971. Mosk, J., was of the opinion that the petition should be granted.
