Test::S...rrorMode(3)

πŸ“¦
version 1.84 Β· 2 versions
, in fedora 43

πŸ’– Test::S...rrorMode(3) πŸ’–

okay so bestie, real talk β€” this is part of the User Contributed Perl Documentation, and it's a lil utility page, but it's doing important work, so let's give it the attention it deserves 🫢


✨ NAME ✨

Test::Smoke::Util::Win32ErrorMode β€” a utility function that switches off the error-popup for the current process. that's it, that's the whole job, and it slays at it πŸ’…


🌸 DESCRIPTION 🌸

so this patch came from RT-39138 β€” you can peek it at https://rt.cpan.org/Ticket/Display.html?id=39138. the code has changed quite a bit since then (we're talking 9 years ago, an actual eternity in code years 😭), but ngl it still looked good and sane, so they were like "yeah okay, we're giving this a place in the code." iconic decision-making fr fr πŸ‘‘

πŸŽ€ lower_error_settings() πŸŽ€

this one calls kernel32::SetErrorMode with the flags SEM_FAILCRITICALERRORS and SEM_NOGPFAULTERRORBOX β€” the whole point being to prevent popups during crashes. no cap, those popups were the drama, and we're shutting them DOWN πŸ’€βœ¨

it also calls Win32::Process::Open()->SetPriorityClass() as a way to renice() the process. lowkey a whole vibe β€” it's giving priority-class energy πŸ¦‹


  • (c) MMVIII Jan Dubois <jdb@cpan.org> β€” original patch πŸ“
  • (c) MMXVII Abe Timmerman <abeltje@cpan.org> β€” integration into Test::Smoke 🌈

and that's the whole page, bestie!! this one's from perl v5.42.0 and it's dated 2025-07-25, so go forth and crash gracefully with zero popups, mwah πŸ’–πŸŽ€πŸ§š

πŸ“¦ where this page comes from