Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

timo-p
Copy link

@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.

None yet

1 participant