Why not use an IllegalStateException?

Gary 

<div>-------- Original message --------</div><div>From: Stefan Bodewig 
<bode...@apache.org> </div><div>Date:01/20/2015  09:34  (GMT-05:00) 
</div><div>To: dev@commons.apache.org </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, bode...@apache.org 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: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to