Modernize exception syntax