Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
BulkException Class Reference
Inheritance diagram for BulkException:
AbstractAggregateException LocalizedException AggregateExceptionInterface

Public Member Functions

 __construct (Phrase $phrase=null, \Exception $cause=null, $code=0)
 
 addData ($data)
 
 getData ()
 
- 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 ()
 

Additional Inherited Members

- Protected Attributes inherited from AbstractAggregateException
 $errors = []
 
 $originalPhrase
 
- Protected Attributes inherited from LocalizedException
 $phrase
 
 $logMessage
 

Detailed Description

Exception thrown while processing bulk of entities

@api

Definition at line 16 of file BulkException.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Phrase  $phrase = null,
\Exception  $cause = null,
  $code = 0 
)

Exception thrown while processing bulk of entities

It is capable of holding both successfully processed entities and failed entities. Client can decide how to handle the information

Parameters
\Magento\Framework\Phrase$phrase
\Exception$cause
int$code

Definition at line 33 of file BulkException.php.

34  {
35  if ($phrase === null) {
36  $phrase = new Phrase('One or more input exceptions have occurred while processing bulk.');
37  }
38  parent::__construct($phrase, $cause, $code);
39  }
$code
Definition: info.phtml:12

Member Function Documentation

◆ addData()

addData (   $data)
Parameters
$dataarray

Definition at line 44 of file BulkException.php.

45  {
46  $this->data = $data;
47  }

◆ getData()

getData ( )
Returns
array

Definition at line 52 of file BulkException.php.

53  {
54  return $this->data;
55  }

The documentation for this class was generated from the following file: