File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,14 @@ interface ItemProcessorInterface
16
16
{
17
17
/**
18
18
* Process the provided item, returning a potentially modified or new item for continued
19
- * processing. If the returned result is null, it is assumed that processing of the item
20
- * should not continue.
19
+ * processing. It should not return null, instead it should throw an InvalidItemException
20
+ * in case of warning;
21
21
*
22
22
* @param mixed $item item to be processed
23
23
*
24
- * @return mixed Potentially modified or new item for continued processing, null if processing of the
25
- * provided item should not continue.
24
+ * @return mixed Potentially modified or new item for continued processing
25
+ * @throws InvalidItemException if there is a problem processing the current record
26
+ * (but the next one may still be valid)
26
27
* @throws \Exception
27
28
*/
28
29
public function process ($ item );
Original file line number Diff line number Diff line change @@ -21,16 +21,12 @@ interface ItemReaderInterface
21
21
* <strong>must</strong> return <code>null</code> at the end of the input
22
22
* data set.
23
23
*
24
- * @throws ParseException if there is a problem parsing the current record
24
+ * @throws InvalidItemException if there is a problem reading the current record
25
25
* (but the next one may still be valid)
26
- * @throws NonTransientResourceException if there is a fatal exception in
27
- * the underlying resource. After throwing this exception implementations
28
- * should endeavour to return null from subsequent calls to read.
29
- * @throws UnexpectedInputException if there is an uncategorised problem
30
- * with the input data. Assume potentially transient, so subsequent calls to
31
- * read might succeed.
32
- * @throws \Exception if an there is a non-specific error.
33
- * @return null|mixed Returns false in case of reading error
26
+ * @throws \Exception if an there is a non-specific error. (step execution will
27
+ * be stopped in that case)
28
+ *
29
+ * @return null|mixed
34
30
*/
35
31
public function read ();
36
32
}
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ interface ItemWriterInterface
28
28
*
29
29
* FIXME: array is not maybe the best structure to hold the items. Investigate this point.
30
30
*
31
+ * @throw InvalidItemException if there is a warning, step execution will continue to the
32
+ * next item.
31
33
* @throws \Exception if there are errors. The framework will catch the
32
34
* exception and convert or rethrow it as appropriate.
33
35
*/
You can’t perform that action at this time.
0 commit comments