Hi,
I try to catch the Exception like this:
try {
$result = $adGroupService->mutate($operations);
} catch (Exception $e) {
printf("An error has occurred: %s\n", $e->getMessage());
}
But no exception is catched...
I can output anything before the line
$result = $adGroupService->mutate($operations);
But I have to comment this line out to get the output.
When I output $operations just before the mutate I get:
Array ( [0] => AdGroupOperation Object ( [operand] => AdGroup Object ( [id]
=> [campaignId] => 673033 [campaignName] => [name] => Earth to Mars Cruise
#4fdb074a0055c [status] => ENABLED [bids] => ManualCPCAdGroupBids Object (
[keywordMaxCpc] => Bid Object ( [amount] => Money Object ( [microAmount] =>
1000000 [ComparableValueType] => [_parameterMap:private] => Array (
[ComparableValue.Type] => ComparableValueType ) ) ) [keywordContentMaxCpc]
=> Bid Object ( [amount] => Money Object ( [microAmount] => 750000
[ComparableValueType] => [_parameterMap:private] => Array (
[ComparableValue.Type] => ComparableValueType ) ) ) [siteMaxCpc] =>
[enhancedCpcEnabled] => [interactionBids] => [AdGroupBidsType] =>
[_parameterMap:private] => Array ( [AdGroupBids.Type] => AdGroupBidsType )
) [experimentData] => [stats] => ) [operator] => ADD [OperationType] =>
[_parameterMap:private] => Array ( [Operation.Type] => OperationType ) )
[1] => AdGroupOperation Object ( [operand] => AdGroup Object ( [id] =>
[campaignId] => 673033 [campaignName] => [name] => Earth to Mars Cruise
#4fdb074a0059c [status] => ENABLED [bids] => ManualCPCAdGroupBids Object (
[keywordMaxCpc] => Bid Object ( [amount] => Money Object ( [microAmount] =>
1000000 [ComparableValueType] => [_parameterMap:private] => Array (
[ComparableValue.Type] => ComparableValueType ) ) ) [keywordContentMaxCpc]
=> Bid Object ( [amount] => Money Object ( [microAmount] => 750000
[ComparableValueType] => [_parameterMap:private] => Array (
[ComparableValue.Type] => ComparableValueType ) ) ) [siteMaxCpc] =>
[enhancedCpcEnabled] => [interactionBids] => [AdGroupBidsType] =>
[_parameterMap:private] => Array ( [AdGroupBids.Type] => AdGroupBidsType )
) [experimentData] => [stats] => ) [operator] => ADD [OperationType] =>
[_parameterMap:private] => Array ( [Operation.Type] => OperationType ) ) )
I just used the AddAdGroups.php from the client library and filled in the
campaign id.
So I can't do much wrong there, I think.
AddCampaign.php and GetCampaigns.php are working fine.
Thank you for your help.
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en