Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Java Checked Exception is BAD! Date: Tue, 9 Feb 2016 18:27:12 -0000 (UTC) Organization: A noiseless patient Spider Lines: 35 Message-ID: References: <00ab9f4e-0f06-48ec-9a65-1a150c129a39@googlegroups.com> <8565ac8a-e4e2-4178-b4da-7f3a8ef8069d@googlegroups.com> <4deef389-ea5b-483a-bff5-4e1bdd45de2e@googlegroups.com> <2b736fcd-b72c-49b5-b4b8-9657ecebd51e@googlegroups.com> <6e3778e5-95d3-459e-9453-7ff7ebf38728@googlegroups.com> <37622de9-e99f-4a19-a8e0-8e9199fb91ea@googlegroups.com> <9cb93501-b58e-4635-935f-075c13f6d9ce@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 9 Feb 2016 18:27:12 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="16729"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9JmQ10SrxI1iiBfKZNGBYg4pasWGMkzg=" User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT 3663720 git://git.gnome.org/pan2) Cancel-Lock: sha1:v5mDBUs0TriGk0WggA0GY3ks3bw= Xref: csiph.com comp.lang.java.programmer:33731 On Tue, 09 Feb 2016 04:57:20 -0800, boxzou wrote: > On Tuesday, 9 February 2016 07:29:40 UTC-5, Martin Gregorie wrote: >> On Mon, 08 Feb 2016 18:46:57 -0800, boxzou wrote: >> >> > Another example is SSH library to execute commands on remote OS. can >> > you document all the errors thrown back by all the linux/unix >> > commands? >> > >> Now you're being silly. SSH isn't written in Java. >> >> In cases like this you'd check the function's result code, if non-zero, >> compare it with the constants in errno.h to see if this is something >> you want to deal with and treat the rest as fatals by calling >> strerror() to get the corresponding error text, display it and exit >> from the program using the result code as the exit status so the >> calling process knows about the failure. >> >> >> -- >> martin@ | Martin Gregorie gregorie. | Essex, UK org | > > there are SSH client in java and also ssh server in java. client > example: trilead. server example: http://mina.apache.org/sshd-project/ So, somebody has written ssh comonents in Java. Good for them. However, that's rather a special case, isn't it. Mention SSH, and 90% plus of those who have heard of will assume you mean their operating system's port of OpenSSH which, as I said, is written in C. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |