[ros-kernel] Re: Enhanced error messages

Joseph Galbraith galb-list at vandyke.com
Wed Jan 7 16:52:46 CET 2004


Martin Fuchs wrote:

> Hello,
> 
> 
>>If I understand your proposal correctly, my app running under
>>ros would give me:
>>
>>Could not open C:\Documents and Settings\galb.mydomain\Application 
>>Data\Xyzzy\foo.txt: "C:\Documents and Settings\galb.mydomain\Application 
>>Data\Xyzzy\foo.txt" not found
>>
>>which seems a little bit obnoxious (I deliberately choose a long file
>>name to make it more obnoxious :-)
> 
> Of course this is a very simple example - your application tries to open
> a file explicitly, and can print its name in the error message.
> There may be more complex scenarios when calling other functions
> that create file names internally and then pass them to CreateFile().
> In this cases you can't simply print out the file name from the application

The point is, I don't think it is a good idea
to deliberately break applications that run perfectly
well under windows.

I actually have an error reporting system which does
deal with the more complicated cases you mention-- and
even in those cases, the file name gets included in
my error messages.

I agree that it would have been simpler if windows
had put the filename in the error message-- but windows
didn't.

And I suspect there are more than a few applications
that are coded to generate useful error messages based
on what the windows error messages contain.

If the results of FormatMessage(ERROR_FILE_NOT_FOUND)
all of a sudden contain the file name, it is going to
uglify many applications that have worked hard to
provide their users with a decent level of information
during error reporting.

Thanks,

Joseph


More information about the Ros-kernel mailing list