Hi,

> What kind of exception message should be there in that case?

I'm not sure about Thomas (the tracker reporter), but for our case, if
com.jcraft.jsch.Session#connect(int) threw JSchException with more info
then just "Auth fail" this would be an improvement. A code (enum) for the
auth method that failed would be handy.

> I think it is not good idea to put HOWTO instruction messages in
exceptions.

I totally agree with that.

Thanks for the quick response.

Cheers,
--
Tomasz Zarna
Staff Software Engineer
IBM SWG Lab, Cracow, Poland



From:   y...@jcraft.com (Atsuhiko Yamanaka)
To:     Tomasz Zarna/Poland/IBM@IBMPL
Cc:     jsch-users@lists.sourceforge.net
Date:   2011-09-13 08:17
Subject:        Re: [JSch-users] Supply more meaningful exception messages



Hi,

Thank for your notification, I had not checked that tracker.

   +-From: Tomasz Zarna <tomaszza...@pl.ibm.com> --
   |_Date: Mon, 12 Sep 2011 14:13:53 +0200 ________
   |
   |I've already commented on the feature request from the subject, but I
hope
   |you don't mind asking the same question here:

   |Do you have any plans to fix/improve this:
   |
https://sourceforge.net/tracker/?func=detail&aid=1047646&group_id=64920&atid=509125
 ?


What kind of exception message should be there in that case?
I think it is not good idea to put HOWTO instruction messages in
exceptions.
It is the role of applications using jsch.

As for the problem you had, it had come from your example program.
If you had tried examples in http://www.jcraft.com/jsch/examples/ ,
you did not, because those examples have implemented
the 'UIKeyboardInteractive' interface, by the default.


Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
    +1-415-578-3454
Skype callto://jcraft/
Twitter: http://twitter.com/ymnk
Facebook: http://facebook.com/aymnk



------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to