40. Damages in lieu of, or in addition to, injunction.—
The plaintiff in a suit for perpetual injunction under section 38, or mandatory injunction under section 39, may claim damages either in addition to, or in substitution for, such injunction and the court may, if it thinks fit, award such damages.
No relief for damages shall be granted under this section unless the plaintiff has claimed such relief in his plaint: Provided that where no such damages have been claimed in the plaint, the court shall, at any stage of the proceedings, allow the plaintiff to amend the plaint on such terms as may be just for including such claim.
The dismissal of a suit to prevent the breach of an obligation existing in favour of the plaintiff shall bar his right to sue for damages for such breach.