Le 26/04/2011 08:56, Martin Paljak a écrit :
> Hello,
>
> On Fri, Apr 22, 2011 at 11:13, Viktor TARASOV
> <viktor.tara...@opentrust.com>  wrote:
>>> ... the other 'warnings' should not happen with 'READ BINARY' when data
>>> are returned,
>>> with exception of 6281 'Part of the returned data may be corrupted'.
>>> I guess that this 'warning' is an error and cannot be ignored.
>>> An appropriate checking has to be added to the proposed diff .
>> Here is the diff of the complete patch proposal.
> What about treating all errors as "exceptions", meaning they all share
> the same namespace and should be handled by higher level tools (like
> exceptions should be caught), so that an end user would probably never
> see this in real life, under normal circumstances? With such
> interpretation there would be no differences between "errors" and
> "warnings" (the nature of the exception is for a developer to figure
> out)
>

Probably I do not completely follow.

Actually there is no principal distinction between 'error' and 'warnings',
all are treated in the same manner and are in the same namespace. Distinction 
is only nominative and comes from ISO-7816-4 .

Let's present it in the following way.
For OpenSC all return codes that is not 9000 are the errors. In some context, 
some errors are treated 'locally' or ignored,
exactly in the same manner as warning "File end reached" is ignored in the 
context of ISO 'READ BINARY'.
In all other contexts this 'warning', if it happens, will be treated as an 
error .
If term 'warning' is misleading, we can change it for 'error'.

> Best,
> Martin

Kind wishes,
Viktor.

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to