Skip to content

Conversation

naydav
Copy link

@naydav naydav commented Sep 15, 2017


/**
* Exception with possibility to set several error messages
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AggregateExceptionInterface Extension Point introduced to support Multiple Errors returned as a result of Validation not mandating to inherit from AbstractAggregateException class

/**
* Get the array of LocalizedException objects. Get an empty array if no errors were added
*
* @return LocalizedException[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getErrors returns LocalizedException[] array to be compatible with current Implementation in Web API which relies on this behavior.

@see the \Magento\Framework\Webapi\Exception
which receives $errors as a set of Localized Exceptions
* @param \Magento\Framework\Exception\LocalizedException[]|null $errors Array of errors messages

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.

2 participants