throw error on casting float