make failwith and raise return a delegate