Skip to content

A new pull request based on your comments about the previous one#9

Open
timo-p wants to merge 2 commits intoddeboer:masterfrom
snoobi:master
Open

A new pull request based on your comments about the previous one#9
timo-p wants to merge 2 commits intoddeboer:masterfrom
snoobi:master

Conversation

@timo-p
Copy link
Copy Markdown

@timo-p timo-p commented Mar 9, 2012

I modified SaveException so that it contains two properties: okModels and errors. OkModels is an array of successfully saved models and errors is an array containing instances of a new class Error. This class contains two properties model and errors. Model is the model which failed to save and errors is an array of errors returned by the Client related to that model.

I added SaveException class to the Client and modified Client::checkResult so that it throws a SaveException which contains the results of the Salesforce request.

Mapper::save catches the SaveExceptions thrown by the client and gets the results from the exception. Mapper::checkResult loops through these results and throws it's own SaveException if needed and inserts the model and errors to the Exception.

Timo Paananen added 2 commits March 9, 2012 16:32
Modified Mapper::Save so that it catches the client's SaveException
Added Mapper::checkResult method which throws a SaveException if there are errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant