[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#170480: libapt-pkg-dev: An error API with more specific codes would be nice.

On Sat, 23 Nov 2002, Daniel Burrows wrote:

> Package: libapt-pkg-dev
> Version: 0.5.4
> Severity: wishlist
>   Right now, apt's error API essentially tells the program
> "an error occured somewhere, here's a human-readable description".  This
> is a nice feature, but sometimes it would be nice to be able to
> distinguish particular errors.  For instance, if a package list file is
> missing, a frontend could automatically fetch new lists (or that
> particular list) to fix the problem.
>   Currently the only approach is a hack: parsing the error string
> returned by apt.  And of course i18n will break even that.  If users could
> access an integer or an untranslated string token that identified the
> particular error condition, that would be great.

Probably the easiest way to fix this, is to extend GlobalError::Item, to also
have an error code.  Then, frontends can iterate the error list, and make more
appropriate decisions.

Reply to: