On 4/6/13 12:16 PM, Daniel Leech wrote:
Hi all,
Following a little discussion on a PR in the CMF, I notice that there
doesn't seem to be a coding standard for formatting exception message strings.
Within Symfony the majority of messages are formatted with sprintf,
whilst some are inline, e.g.
sprintf
throw new AclAlreadyExistsException(sprintf('%s is already associated with
an ACL.', $oid));
inline
throw new \RuntimeException('Execution failed with return code:
'.$code.'.');
So, my question is: Should the coding standard be changed to say that
exception messages should be formatted with sprintf?
Yes, using sprintf is what the coding standard should document. Can you
submit a PR on the docs? And perhaps a PR on symfony/symfony to fix
inlined exceptions?
Thanks,
Fabien
Cheers
Dan
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to symfony-devs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.