Raise an appropriate error for unsupported format