Hi,

I am reading code of below method and found there is one exception thrown with 
little information which is not helpful for end users.
com.jcraft.jsch.Session.connect(int)

        while (true) {
            buf = read(buf);
            if (kex.getState() == buf.getCommand()) {
                kex_start_time = System.currentTimeMillis();
                boolean result = kex.next(buf);
                if (!result) {
                    //System.err.println("verify: "+result);
                    in_kex = false;
                    throw new JSchException("verify: " + result);
                }
            } else {
                in_kex = false;
                throw new JSchException("invalid protocol(kex): " + 
buf.getCommand());
            }
            if (kex.getState() == KeyExchange.STATE_END) {
                break;
            }
        }

The JSchException("verify:"+result) will result in below stack trace when it is 
thrown:

    Caused by: com.jcraft.jsch.JSchException: verify: false             at 
com.jcraft.jsch.Session.connect(Session.java:305)            at 
com.jcraft.jsch.Session.connect(Session.java:158)            at 
com.ericsson.commonlibrary.nealservices.fault.NodeSftp.connect(NodeSftp.java:44)
             ... 37 more
This kind of exception message is almost useless for end users, especially for 
those newbies. So, could you please refine this and make it more readable and 
understandable? Thanks!
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to