nus-cs2113-AY2223S2 / pe-dev-response

0 stars 0 forks source link

Sequence diagram for file loader could be more accurate #746

Open nus-pe-bot opened 1 year ago

nus-pe-bot commented 1 year ago

Note from the teaching team: This bug was reported during the Part II (Evaluating Documents) stage of the PE. You may reject this bug if it is not related to the quality of documentation.


image.png

Under the InvalidFormatException object, i think the lifeline should be destroyed, right after the activation bar, as the object is destroyed


[original: nus-cs2113-AY2223S2/pe-interim#1003] [original labels: severity.VeryLow type.DocumentationBug]

ZiqiuZeng commented 1 year ago

Team's Response

To clarify, object destruction and exception handling are two separate concepts. Object destruction involves releasing the memory of an object, making it no longer accessible, whereas exception handling deals with managing errors or exceptional situations during program execution.

Regarding the InvalidFormatException object, although an exception has been thrown at that stage, the object is still required and will be used later in the program. Even if it may not be actively in use, the object is still considered alive until its memory has been released. Therefore, regarding object deletion, it is not appropriate to destroy the object immediately after an exception is thrown.

Duplicate status (if any):

--