|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (Phrase $phrase=null, \Exception $cause=null, array $messages=[], $code=0) | |
| addMessage (AbstractMessage $message) | |
| getMessages ($type='') | |
Public Member Functions inherited from InputException | |
| __construct (Phrase $phrase=null, \Exception $cause=null, $code=0) | |
Public Member Functions inherited from AbstractAggregateException | |
| __construct (Phrase $phrase, \Exception $cause=null, $code=0) | |
| addError (Phrase $phrase) | |
| addException (LocalizedException $exception) | |
| wasErrorAdded () | |
| getErrors () | |
Public Member Functions inherited from LocalizedException | |
| __construct (Phrase $phrase, \Exception $cause=null, $code=0) | |
| getRawMessage () | |
| getParameters () | |
| getLogMessage () | |
Protected Attributes | |
| $messages = [] | |
Protected Attributes inherited from AbstractAggregateException | |
| $errors = [] | |
| $originalPhrase | |
Protected Attributes inherited from LocalizedException | |
| $phrase | |
| $logMessage | |
Additional Inherited Members | |
Static Public Member Functions inherited from InputException | |
| static | invalidFieldValue ($fieldName, $fieldValue, \Exception $cause=null) |
| static | requiredField ($fieldName) |
Data Fields inherited from InputException | |
| const | DEFAULT_MESSAGE = 'One or more input exceptions have occurred.' |
| const | INVALID_FIELD_RANGE = 'The %fieldName value of "%value" must be between %minValue and %maxValue' |
| const | INVALID_FIELD_MIN_VALUE = 'The %fieldName value of "%value" must be greater than or equal to %minValue.' |
| const | INVALID_FIELD_MAX_VALUE = 'The %fieldName value of "%value" must be less than or equal to %maxValue.' |
| const | INVALID_FIELD_VALUE = 'Invalid value of "%value" provided for the %fieldName field.' |
| const | REQUIRED_FIELD = '"%fieldName" is required. Enter and try again.' |
Exception to be thrown when data validation fails
@api
Definition at line 21 of file Exception.php.
Constructor
| \Magento\Framework\Phrase | $phrase | |
| \Exception | $cause | |
| array | $messages | Validation error messages |
| int | $code |
Definition at line 36 of file Exception.php.
| addMessage | ( | AbstractMessage | $message | ) |
Setter for message
| \Magento\Framework\Message\AbstractMessage | $message |
Definition at line 64 of file Exception.php.
| getMessages | ( | $type = '' | ) |
Getter for messages by type or all
| string | $type |
Definition at line 79 of file Exception.php.
|
protected |
Definition at line 26 of file Exception.php.