Gtk2::Ex::Carp

Gtk2::Ex::Carp is a GTK friendly die() and warn() functions.
Download

Gtk2::Ex::Carp Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Gavin Brown
  • Publisher web site:
  • http://search.cpan.org/~gbrown/Net-Ewtoo-Bot-0.16/Bot.pm

Gtk2::Ex::Carp Tags


Gtk2::Ex::Carp Description

Gtk2::Ex::Carp is a GTK friendly die() and warn() functions. Gtk2::Ex::Carp is a GTK friendly die() and warn() functions.SYNOPSIS use Gtk2::Ex::Carp; # these override the standard Perl functions: warn('i told you not to push that button!'); die('an ignominious death'); # new functions for showing extended error information: # like warn(), but shows a dialog with extra information # in an expandable text entry: worry($SHORT_MESSAGE, $EXTENDED_INFORMATION); # like worry(), but fatal: wail($SHORT_MESSAGE, $EXTENDED_INFORMATION);This module exports four functions, of which two override the standard die() and warn() functions, and two which allow for extended error reporting. When called, these functions display a user-friendly message dialog window.The die() function in this module actually replaces the core die() function, so any modules you've loaded may die will use former instead of the latter. die() will also print the error message to STDERR and will exit the program (with the appropriate exit code) when the dialog is dismissed.The warn() function will also print a message to STDERR, but will allow the program to continue running when the dialog is dismissed.EXTRA FUNCTIONSThe worry() and wail() functions behave just like warn() and die(), respectively, except that they allow you to provide additional information. A second argument, which can contain additional error information, is used to fill a text box inside an expander.HANDLING GLIB EXCEPTIONSThis module also installs warn() as a Glib exception handler. Any unhandled exceptions will be presented to the user in a warning dialog.PROGRAM FLOWNote that all the functions in this module create dialogs and use the run() method, so that the standard Glib main loop is blocked until the user responds to the dialog. Requirements: · Perl


Gtk2::Ex::Carp Related Software