An outburst from a massive star 40 days before a supernova explosion