diff options
author | Karl Williamson <khw@cpan.org> | 2020-09-07 09:27:28 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-09-29 22:37:24 -0600 |
commit | 4559f7e6350cb49ddd0cd4ae3df3db012693f220 (patch) | |
tree | 7feadcea469e19d6391d5c090f5fb2b7ae302c19 /util.c | |
parent | 59892837454d0ca367c3f7c83b2a646c57333b9a (diff) | |
download | perl-4559f7e6350cb49ddd0cd4ae3df3db012693f220.tar.gz |
perlapi: croak_nocontext is preferred over plain croak
When you are about to die, the time/space tradeoff may tilt towards space.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1873,8 +1873,9 @@ or build an error message in an SV yourself, it is preferable to use the C<L</croak_sv>> function, which does not involve clobbering C<ERRSV>. The two forms differ only in that C<croak_nocontext> does not take a thread -context (C<aTHX>) parameter, so is used in situations where the caller doesn't -already have the thread context. +context (C<aTHX>) parameter. It is usually preferred as it takes up fewer +bytes of code than plain C<Perl_croak>, and time is rarely a critical resource +when you are about to throw an exception. =cut */ |