This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Add debugging info to panic message
authorKarl Williamson <khw@cpan.org>
Sun, 6 Dec 2020 22:45:20 +0000 (15:45 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 8 Dec 2020 13:44:20 +0000 (06:44 -0700)
locale.c

index d3ab14a..d399d9c 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -5394,8 +5394,8 @@ Perl_my_strerror(pTHX_ const int errnum)
         if (save_locale && ! locale_is_C) {
             if (! do_setlocale_c(LC_MESSAGES, save_locale)) {
                 Perl_croak(aTHX_
-                     "panic: %s: %d: setlocale restore failed, errno=%d\n",
-                             __FILE__, __LINE__, errno);
+                     "panic: %s: %d: setlocale restore to '%s' failed, errno=%d\n",
+                             __FILE__, __LINE__, save_locale, errno);
             }
             Safefree(save_locale);
         }