silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
720 stars 822 forks source link

Debug: provide an option to _not_ call `die()` #10997

Open sabina-talipova opened 9 months ago

sabina-talipova commented 9 months ago

Description

The Debug::endshow() method calls die() at the end. Various other methods such as dump() do not. We should provide a way for the developer to decide whether they want to call die() or not, perhaps via a new static such as dieOnNotice() which accepts a bool, and the bool determines if the methods should call die() or not.

See: https://github.com/silverstripe/silverstripe-framework/blob/cf78a9d785b9959a92dfb52c2a456bea80a4c567/src/Dev/Debug.php#L29-L30

GuySartorelli commented 9 months ago

@sabina-talipova Do you know what is intended by either of those todo notes? I'm not sure what is intended and wouldn't know how to implement this. If you have more context please add it - otherwise this might be one we should close.

sabina-talipova commented 9 months ago

I've updated ticket. I'm not quite sure, should we provide some sort of functionality to user. It's just how I understood this todo comment. If you think it's not necessary we can close this issue.