Google Ads 指令碼會盡力執行:嘗試變更 Google Ads 資料,但如果某項變更失敗,指令碼會將其記錄到變更記錄中,並繼續執行:
// Attempt an invalid change.letamount=999999999999;campaign.getBudget().setAmount(amount);// Error is logged into Changes log, but the script keeps running.// Suppose we must know whether the change actually happened.if(campaign.getBudget()!=amount){// The current value of budget is not the one we expected.// The change must have failed.}
[null,null,["上次更新時間:2025-03-04 (世界標準時間)。"],[[["Google Ads scripts will log errors when changes fail but continue running, allowing you to check if a change was successful and handle it accordingly."],["Certain errors, such as missing required parameters, will halt script execution and require fixing before the script can run."],["While scripts proceed even when exceeding quotas, warnings are logged and should be reviewed."],["Script execution logs provide valuable information through errors (red), warnings (orange), and custom messages for debugging and monitoring."],["Successfully returned objects from Google Ads scripts are safe to use, indicating the operation was successful."]]],[]]