An actually useful error message

by David Brickner

Last week I had to reinstall Linux on my work laptop. I'm not entirely certain what happened, but I had some filesystem corruption on my JFS formatted root partition and though I was able to repair it and didn't lose any data (thank you for saving my bacon yet again Knoppix) my disk started thrashing more often afterwards and I just didn't feel comfortable with that. So, I backed up my data, wiped everything clean, and decided to move from the Arch distro which I had been using since Dec 2004 to the flavor of the past year, Ubuntu.



But, this article isn't really about that. It is about my first attempt at printing from the Firefox web browser today. After sending several pages to the printer (a somewhat old HP 5000GN) I walked over to it and found that I had not printed the most recent sales for Linux Desktop Hacks, but rather, I had three pages of the same error message.


This message was about 11 lines long, and told me in a straight forward manner that the problem was that the Postscript interpreter on my printer was version 2014.18 and that the printout requires version 2015 or greater. Now, I sorta had an idea what that meant, but I really didn't know how to go about fixing it...my first thought was that I would have to upgrade the firmware of the printer which is something that I had to do in the past when some of our Macs were having a hard time printing PDFs from InDesign. Anyway...



...I didn't need to figure out what to do. The rest of the error message told me exactly how to fix the problem. It involved changing the Firefox print command from the lpr gibberish that is there by default, to include some preprocessing with Ghostscript. I'm in the amateur ranks when it comes to lpr statements and Ghostscript is even more of an unknwn, but I could certainly type in what I was told. So I did...



...and it worked.



If you encounter this problem and error message you could say that its irksome to have to make any adjustments from the default. Or you could just be happy that some programmer had the forethought to put in a useful error message for something that would possibly be a common problem. Having this information right there in the printout is much more useful than having to search for a FAQ somewhere, particularly if all you know is your document didn't print.



If only there were more good error messages like this.




2 Comments

eddieparker
2005-10-27 15:12:53
Makes you wonder tho'....
... why did it have to *print* the error message to the printer? Why not to the display?


Good on getting a good error, but why waste paper? :)

ChrisTyler
2005-10-28 17:05:29
Makes you wonder tho'....

... why did it have to *print* the error message to the printer? Why not to the display?


Because the printer's PostScript version isn't known to Firefox. But the PostScript code in the document - which executes on the printer - could check the version ID and output the error message if necessary. Very clever, and yet another example of good coding in Firefox!