com.deepl.api.ConnectionException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deepl-java Show documentation
Show all versions of deepl-java Show documentation
DeepL API Java Client Library
The newest version!
// Copyright 2022 DeepL SE (https://www.deepl.com)
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
package com.deepl.api;
/** Exception thrown when a connection error occurs while accessing the DeepL API. */
public class ConnectionException extends DeepLException {
private final boolean shouldRetry;
public ConnectionException(String message, boolean shouldRetry, Throwable cause) {
super(message, cause);
this.shouldRetry = shouldRetry;
}
/**
* Returns true
if this exception occurred due to transient condition and the request
* should be retried, otherwise false
.
*/
public boolean getShouldRetry() {
return shouldRetry;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy