It depends on the policies of the exchange and the extent of the hack. Some exchanges have insurance policies to cover losses, but not all do.