The principle of ex turpi causa prevented the claimant from recovering for damage which was the consequence of his committing the offence of manslaughter.
Gray v Thames Trains Ltd  UKHL 33
The ICLR have kindly agreed for their WLR (D) case report to be reproduced below.
NEGLIGENCE — Causation — Loss of earnings — Claimant injured in railway accident suffering post traumatic stress disorder — Claimant killing man whilst suffering from disorder and detained in hospital — Whether claim for loss of earnings while detained barred on grounds of public policy
A person who, as a result of a railway accident, suffered post-traumatic stress disorder which led him to kill someone, could not, as part of his claim for damages in negligence against the train operators responsible for the accident, recover damages for loss of earnings following his detention after the killing in prison, and subsequently in hospital under ss 37 and 41 of the Mental Health Act 1983.
The House of Lords so held in allowing an appeal by the defendants, Thames Trains Ltd and Network Rail Infrastructure Ltd (formerly Railtrack plc) from the order of the Court of Appeal (Sir Anthony Clarke MR, Tuckey, Smith LJJ);  2 WLR 351 allowing an appeal by the claimant, Kerrie Francis Gray, against the ruling of Flaux J that his conviction for manslaughter precluded a claim for loss of earnings during his detention by reason of the public policy expressed in the doctrine of ex turpi causa non oritur actio.
LORD HOFFMANN said that the ex turpi causa maxim expressed not so much a principle as a policy. It could be stated in a wider or a narrower form. The wider and simpler version was that you could not recover for damage which was the consequence of your own criminal act. In its narrower form, it was that you could not recover for damage which was the consequence of a sentence imposed upon you for a criminal act. In such a case it was the law which, as a matter of penal policy, had caused the damage and it would be inconsistent for the law to require that the person be compensated for that damage. The narrower version precluded the claim for loss of earnings after the claimant had been sentenced for the manslaughter.
LORD RODGER OF EARLSFERRY, concurring, said that civil courts had to proceed on the basis that even though the claimant’s responsibility for the killing had been diminished by his stress disorder, he nevertheless had known what he was doing and was responsible for what he did. And it had to be assumed that the disposals adopted by the criminal courts were appropriate in all the circumstances, including the circumstance that he was suffering from the stress disorder. While it was correct to say that a hospital order, even with a restriction, was not regarded as a punishment, that did not mean that the judge was treating the claimant as not being to blame for what he did. By imposing the hospital orders, the claimant’s earning capacity had been removed for as long as they were in force. It would be inconsistent with the policy underlying the making of the orders for a civil court now to award the claimant damages for loss of earnings relating to the period when he was subject to them.
LORD PHILLIPS OF WORTH MATRAVERS and LORD BROWN OF EATON-UNDER-HEYWOOD delivered opinions concurring with Lord Hoffmann and Lord Rodger of Earlsferry.
LORD SCOTT OF FOSCOTE agreed.
;  WLR (D) 195
HL(E): Lord Phillips of Worth Matravers, Lord Hoffmann, Lord Scott of Foscote, Lord Rodger of Earlsferry, Lord Brown of Eaton-under-Heywood : 17 June 2009
Appearances: Christopher Purchas QC and Steven Snowden (instructed by Halliwells LLP, Manchester) for the defendants; Anthony Scrivener QC and Toby Riley-Smith (instructed by Collins, Watford) for the claimant.
Reported by: C T Beresford, barrister.