Download & Extend

Comments suggest exceptions are ignore, when in fact they are rethrown

Project:Feeds
Version:7.x-2.x-dev
Component:Documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

In FeedsSource::import() there is an exception block that ends

catch (Exception $e) {
  // Do nothing.
}

in fact, this exception is being stored and re-thrown after we've had a chance to do some clean up (a bit like a finally block that doesn't require PHP 5.5). The comment (and any similar comments) should be corrected to reflect this.

Comments

#1

Status:active» needs review

Here is a patch for the two examples I was able to find.

Replaces the "Do nothing" comment with one saying "$e is stored and re-thrown once we've had a chance to log our progress"

AttachmentSizeStatusTest resultOperations
feeds-1852048-document-finally-emulation-1.patch838 bytesIgnoredNoneNone

#2

Any chance of getting this committed? It's just a comment change, and it would be a shame if it bitrotted or confused anyone else.

nobody click here