Merge pull request #333 from ng1905/dev
Do not log stack trace when stopping bot
This commit is contained in:
commit
91eaccd8ad
@ -24,6 +24,7 @@ import org.telegram.telegrambots.logging.BotLogger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InvalidObjectException;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.InvalidParameterException;
|
||||
@ -259,6 +260,10 @@ public class DefaultBotSession implements BotSession {
|
||||
BotLogger.severe(responseContent, LOGTAG, e);
|
||||
}
|
||||
}
|
||||
} catch (SocketException e) {
|
||||
if (!e.getMessage().equals("Socket Closed")) {
|
||||
BotLogger.severe(LOGTAG, e);
|
||||
}
|
||||
} catch (SocketTimeoutException e) {
|
||||
BotLogger.fine(LOGTAG, e);
|
||||
} catch (InvalidObjectException | TelegramApiRequestException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user