Kirsle.net logo Kirsle.net

Error Message Generator (Classic)

ErrorGen
Notice: The version of ErrorGen on this page was originally written in 2006 in Perl and in 2023 I have recreated a shiny modern version in Go. Check out ErrorGen 2.0.0. The original Perl releases are still available on this page.

Project Description

The Error Message Generator (ErrorGen) is a simple program that generates customized error dialogs. The idea was inspired by a web-based error generator (Atom Smasher, RIP) which created images of error boxes. My program, however, creates "real" error boxes that can be dragged around the screen and interacted with.

The command-line, scriptable version of Error Message Generator is called ZenMsg, named after the GNOME utility, Zenity. It's a version of the generator that can be provoked from batch files and scripts. All of the named built-in icons available in ErrorGen are built-in to ZenMsg, or you can bring your own icon. Actually, ZenMsg is just a very light wrapper around my Perl module, Tk::StyleDialog.

Notes on Windows XP compatibility: this program should still run on Windows 11 but may need to run in Windows XP compatibility mode. These binaries were built way back in 2008 on Windows XP using something like perl2exe. If you have Perl/Tk available, running the source .pl file may be the best way to run the program. Last time I checked (around 2008), ActivePerl for Windows came with Tk or it was a simple ppm install away.

Features

  • Fully customizable error box: select the title, icon, and message.
  • Create up to THREE buttons for the error box and specify what each of them say, and which ones are "greyed out"
  • Advanced features to make the error keep coming back until the right button is selected.
  • A button that minimizes and renames the control window, leaving only the error dialog visible on screen.

Screenshots

Screenshot
ErrorGen in action, surrounded by example error messages.
(click for a larger version)

ZenMsg

ZenMsg is a command-line version of Error Message Generator that can be invoked by batch files or scripts. Example usage:
ZenMsg --error -t "An error has occurred." -b "Abort" -b "Retry" -b "Fail"

The executable comes with an HTML help file. ZenMsg -? will display the same help file at the command line. The document describes how to use ZenMsg.

The program will print the user's selected button text to its standard output; so if invoked by a batch file or Python script, you can use ZenMsg to ask the user a question and catch which button they selected.

There is no binary Linux version of this utility. The source code however is available and will execute under Linux; I've just not compiled a standalone executable (there are a handful of other utilities that do the job: see Zenity. Source code is available on the Downloads tab.

Windows Executable

Win32 Download ZenMsg
Version 0.01 - 2008/09/18
ZIP format/3.6 MB

The source code to ZenMsg.pl is at the bottom of this page with all the download links.

Tk::StyleDialog

If you happen to be writing Perl scripts, the underlying module used in ZenMsg is Tk::StyleDialog, a custom widget for Perl/Tk I had released way back in 2008. All the functionality and built-in named icons from the old Atom Smasher error generator are in the Tk::StyleDialog module itself.

use Tk::StyleDialog;

my $how_say_you = $mw->StyleDialog (
  -title => 'Uh-oh!',
  -icon  => 'error2',
  -text  => "Now you've done it--you've broken the Internet!\n\n"
          . "What are you going to do now?",

  -buttons        => [ 'Blame the other guy', 'I didn\'t do it',
                       'Plead the 5th', 'Admit guilt' ],
  -button_states  => [ 'normal', 'normal', 'normal', 'disabled' ],
  -default_button => 'Blame the other guy',
  -cancel_button  => 'Plead the 5th',
);
	

Software License

    Error Message Generator
    Copyright (C) 2008  Casey Kirsle

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Downloads

It's recommended that you download the latest version of this software as listed below. To download older versions and source code, skip to the next section.

Windows Executable

Win32 Download Error Message Generator
Version 1.2 - 2007/06/28
ZIP format/2.1 MB

Linux Binary

Linux Download Error Message Generator
Version 1.2 - 2007/06/28
TAR.GZ format/4.6 MB

All Distributions

The following are all the distributions available for this software, starting with the most recent. Source code is also available for all versions.

Release Windows EXE Linux Binary Source Code
ErrorGen 1.2
2007/06/28
Win32 ErrorGen 1.2
(ZIP; 2.1 MB)
Linux ErrorGen 1.2
(TAR.GZ; 4.6 MB)
Perl Source ErrorGen 1.2
(TAR.GZ; 114.1 KB)
ZenMsg 0.01
2008/09/18
Win32 ZenMsg 0.01
(ZIP; 3.6 MB)
Linux Not available. Perl Source ZenMsg 0.01
(ZIP; 13 KB)