NAME
TUI::Drivers::SystemError - system error and Ctrl-Break handling
SYNOPSIS
use TUI::Drivers::SystemError;
# Driver/application lifecycle usually handles this automatically,
# but manual bracketing is available when needed:
TSystemError->suspend();
# ... critical section ...
TSystemError->resume();
if ($TUI::Drivers::SystemError::ctrlBreakHit) {
# React to Ctrl-Break state as needed.
}
DESCRIPTION
TUI::Drivers::SystemError provides system-level error handling facilities used by the Turbo Vision driver layer.
The module exposes global state related to Ctrl-Break handling and provides class methods to suspend and resume system-level interrupt processing. This functionality is used to coordinate application behavior during critical sections and shutdown.
In typical applications, TSystemError is coordinated by the application lifecycle (for example via TApplication->suspend() and TApplication->resume()), rather than being called directly in business logic.
Commonly Used Features
The most common interaction is checking $ctrlBreakHit, which is set by the platform backend when a Ctrl-Break condition is observed.
suspend() and resume() are primarily lifecycle hooks around driver subsystems. In strict debugging mode, backend Ctrl-Break handler changes are intentionally skipped.
VARIABLES
$ctrlBreakHit
Indicates whether a Ctrl-Break event has occurred.
This variable is set to a true value whenever the user triggers a Ctrl-Break interrupt. The flag may be cleared by assigning it a false value.
$saveCtrlBreak
Reserved internal state flag for Ctrl-Break handling compatibility.
It is declared as part of the driver state surface but is not actively modified by this module's current implementation.
METHODS
suspend
TSystemError->suspend();
Suspends system-level Ctrl-Break handling.
This method disables Ctrl-Break processing while the application performs critical operations. The previous system state is preserved internally.
resume
TSystemError->resume();
Restores system-level Ctrl-Break handling.
This method re-enables Ctrl-Break processing and restores the system state that was active before suspend was called.
SEE ALSO
TUI::Drivers::HardwareInfo, TUI::Drivers::Event
AUTHORS
- Borland International (original Turbo Vision design)
- J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)
COPYRIGHT AND LICENSE
Copyright (c) 1990-1994, 1997 by Borland International
Copyright (c) 2021-2026 the "AUTHORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).