Bug 692604 - error message is nonsense when option value is invalid
Summary: error message is nonsense when option value is invalid
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 9.04
Hardware: PC Linux
: P4 enhancement
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-16 22:11 UTC by matteosistisette
Modified: 2012-08-25 02:50 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matteosistisette 2011-10-16 22:11:12 UTC
I happened to write by mistake:

-dGraphicsAlphaBits=4 -dTextAlphaBit=n

with a literal 'n' instead of replacing it with a number.

The error message that I got was:

-dvar=name requires name=null, true, or false

This error message doesn't make any sense to the user.

A correct error message would be something like 
"invalid value 'n' for option -dTextAlphaBit"

Note there are two issues:
1. the error message doesn't make sense to the user (why null, true or false?) (I do understand, I guess, where this comes from, but this is too low-level)
2. it doesn't tell you WHICH option it is complaining about.

Issue 2 is very important too. I spent several minutes staring at the -dGraphicsAlphaBit=4 and wondering what was wrong with the 4.
Comment 1 Alex Cherepanov 2012-08-24 23:23:07 UTC
A patch that improves error messages has been committed as a rev:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d840d02d5fd655c397b08e01a273a4e4e757f96e