warnings (Re: RFC version issues)

A. Pagaltzis said:
    # or even (to get the typical console messages to shut up)
    no warnings 'gtk2-assert';

to change the topic slightly, those typical console messages ("Gtk-CRITICAL:
assertion foo != NULL failed") are usually indicative of app code doing
something wrong, and gtk+ being very paranoid and protecting itself from that.

if gtk_init() finds among the command line arguments the string
"--g-fatal-warnings", it will turn CRITICAL messages into FATAL messages, and
call abort().  this is handy for development because it lets you get a stack
trace to find out who called the complaining function (something that's not
possible otherwise in C).

i tried at one point to to fatal g_log() messages into croaks, to get the same
effect in Perl, but g_log() appears to eat the fatal ones deep in the library
before they even get to our registered handlers.

you can, of course, use your own g_log() handlers, to print the output of
caller() or even just eat the messages.  see the Glib::Log manpage.

muppet <scott at asofyet dot org>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]