|
@@ -763,10 +763,11 @@ public class IRCParser implements SecureParser, Runnable {
|
763
|
763
|
* Handle an onConnect error.
|
764
|
764
|
*
|
765
|
765
|
* @param e Exception to handle
|
|
766
|
+ * @param isUserError Is this a user error?
|
766
|
767
|
*/
|
767
|
|
- private void handleConnectException(final Exception e) {
|
|
768
|
+ private void handleConnectException(final Exception e, final boolean isUserError) {
|
768
|
769
|
callDebugInfo(DEBUG_SOCKET, "Error Connecting (" + e.getMessage() + "), Aborted");
|
769
|
|
- final ParserError ei = new ParserError(ParserError.ERROR_ERROR, "Exception with server socket", getLastLine());
|
|
770
|
+ final ParserError ei = new ParserError(ParserError.ERROR_ERROR + (isUserError ? ParserError.ERROR_USER : 0), "Exception with server socket", getLastLine());
|
770
|
771
|
ei.setException(e);
|
771
|
772
|
callConnectError(ei);
|
772
|
773
|
|
|
@@ -788,16 +789,16 @@ public class IRCParser implements SecureParser, Runnable {
|
788
|
789
|
try {
|
789
|
790
|
connect();
|
790
|
791
|
} catch (UnknownHostException e) {
|
791
|
|
- handleConnectException(e);
|
|
792
|
+ handleConnectException(e, true);
|
792
|
793
|
return;
|
793
|
794
|
} catch (IOException e) {
|
794
|
|
- handleConnectException(e);
|
|
795
|
+ handleConnectException(e, true);
|
795
|
796
|
return;
|
796
|
797
|
} catch (NoSuchAlgorithmException e) {
|
797
|
|
- handleConnectException(e);
|
|
798
|
+ handleConnectException(e, false);
|
798
|
799
|
return;
|
799
|
800
|
} catch (KeyManagementException e) {
|
800
|
|
- handleConnectException(e);
|
|
801
|
+ handleConnectException(e, false);
|
801
|
802
|
return;
|
802
|
803
|
}
|
803
|
804
|
|