[RFC] Need for a new KIO slave error: "unsupported file format"

Nicolas Goutte nicolasg at snafu.de
Wed Jun 22 15:36:15 BST 2005


On Wednesday 22 June 2005 16:25, David Faure wrote:
> On Wednesday 22 June 2005 16:05, Nicolas Goutte wrote:
> > I would need a "unsupported file format" for a KIO slave.
> >
> > So probably a new value should be added to kdelibs/kio/kio/global.*. My
> > question is how should it be labeled to avoid to have an error message
> > that has a too narrow use.
> >
> > I propose ERR_UNSUPORTED_FILE_FORMAT with
> > "Unsupported file format.\n%1"
>
> I don't really object, but I wonder what do we really gain from it,
> compared to using ERR_SLAVE_DEFINED and shipping the complete error message
> with it?

The problem is that it is in kdebase. So it needs its own .pot file and then 
to ensure that the right catalogue file is loaded at runtime. As I do not 
really know how much complex this way would be, I thought that adding a new 
message code would be easier.

> To the user it would look the same, the only difference would be
> if you wanted to check for this error code from some application code, but
> that's obviously not the case for kio_tar, right?

Well, I had a thought in such a direction too. However that can only be done 
in KDE 4 as it is BIC. (The idea was to give even more precise error messages 
by making KZip return error codes instead of true/false.)

As for what an application could do with ERR_UNSUPORTED_FILE_FORMAT, well, i 
do not know, Probably most applications will drop the error code anyway and 
simply display "Could not open file %1" without passing the KIO error.

Have a nice day!






More information about the kde-core-devel mailing list