Why not use an IllegalStateException?

Gary 

<div>-------- Original message --------</div><div>From: Stefan Bodewig 
<[email protected]> </div><div>Date:01/20/2015  09:34  (GMT-05:00) 
</div><div>To: [email protected] </div><div>Cc:  </div><div>Subject: Re: 
svn commit: r1653252 - in /commons/proper/compress/trunk/src: changes/ 
main/java/org/apache/commons/compress/archivers/sevenz/ 
test/java/org/apache/commons/compress/archivers/sevenz/ </div><div>
</div>On 2015-01-20, Emmanuel Bourg wrote:

> Le 20/01/2015 15:24, [email protected] a écrit :

>> throw a special exception when there is no password for an encrpyted
>> 7z archive - COMPRESS-298

> Is it possible to mention the name of the file in the message of the
> exception?

Not without modifying the CoderBase contract since the class throwing
the exception only knows the stream it is supposed to decode.

Since all this is package private, it should be possible to do it.  I'll
take a look.

Thanks

        Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to