On Wednesday, January 2, 2019 4:22:11 AM CST Julien Falque wrote: > Anyone? > > Le mercredi 7 mars 2018 14:21:02 UTC+1, Julien Falque a écrit : > > Hi everyone. > > > > About logging exceptions, PSR-3 says: > > > > If an Exception object is passed in the context data, it MUST be in the > > > >> 'exception' key. Logging exceptions is a common pattern and this allows > >> implementors to extract a stack trace from the exception when the log > >> backend supports it. Implementors MUST still verify that the 'exception' > >> key is actually an Exception before using it as such, as it MAY contain > >> anything. (https://www.php-fig.org/psr/psr-3/#13-context) > > > > When this was published, PHP 7 wasn't released and Throwable interface > > didn't exist. I have several questions about this. > > > > Should Throwable be taken into account? > > > > If so, should we update PSR-3 or is it better to write a new PSR (like > > with PSR-12 for PSR-2)? > > > > Do we want to keep using 'exception' as key? Should we use 'error'? > > 'throwable'? All of them? > > > > Thanks.
If anything, I think an Errata that says "treat any other Throwable the same as an Exception" is probably the best way forward. No need for a whole new PSR just for that. --Larry Garfield -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/1860635.hxHWIpRUdN%40vulcan. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: This is a digitally signed message part.
