Tabnine Logo
ServiceException.getErrorMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getErrorMessage
method
in
org.jets3t.service.ServiceException

Best Java code snippets using org.jets3t.service.ServiceException.getErrorMessage (Showing top 7 results out of 315)

origin: ch.cern.hadoop/hadoop-aws

private void handleServiceException(ServiceException e) throws IOException {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  else {
   if(LOG.isDebugEnabled()) {
    LOG.debug("Got ServiceException with Error code: " + e.getErrorCode() + ";and Error message: " + e.getErrorMessage());
   }
  }
 }
origin: iterate-ch/cyberduck

throw new IOException(e.getErrorMessage(), new S3ExceptionMappingService().map(e));
origin: net.java.dev.jets3t/jets3t

&& exception.getErrorMessage().contains("Please use AWS4-HMAC-SHA256"))
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

&& exception.getErrorMessage().contains("Please use AWS4-HMAC-SHA256"))
origin: iterate-ch/cyberduck

if(StringUtils.isNotBlank(e.getErrorMessage())) {
  this.append(buffer, StringEscapeUtils.unescapeXml(e.getErrorMessage()));
origin: iterate-ch/cyberduck

@Override
public Distribution read(final Path container, final Distribution.Method method, final LoginCallback prompt) throws BackgroundException {
  if(method.equals(Distribution.WEBSITE)) {
    try {
      final WebsiteConfig configuration = session.getClient().getWebsiteConfig(container.getName());
      final Distribution distribution = new Distribution(this.getOrigin(container, method),
          method, configuration.isWebsiteConfigActive());
      distribution.setStatus(LocaleFactory.localizedString("Deployed", "S3"));
      // http://example-bucket.s3-website-us-east-1.amazonaws.com/
      distribution.setUrl(URI.create(String.format("%s://%s", method.getScheme(), this.getWebsiteHostname(container))));
      distribution.setIndexDocument(configuration.getIndexDocumentSuffix());
      distribution.setContainers(new S3BucketListService(session, new S3LocationFeature.S3Region(session.getHost().getRegion())).list(
          new Path(String.valueOf(Path.DELIMITER), EnumSet.of(Path.Type.volume, Path.Type.directory)), new DisabledListProgressListener()).toList());
      return distribution;
    }
    catch(ServiceException e) {
      // Not found. Website configuration not enabled.
      final Distribution distribution = new Distribution(this.getOrigin(container, method), method, false);
      distribution.setStatus(e.getErrorMessage());
      distribution.setUrl(URI.create(String.format("%s://%s", method.getScheme(), this.getWebsiteHostname(container))));
      return distribution;
    }
  }
  else {
    return super.read(container, method, prompt);
  }
}
origin: iterate-ch/cyberduck

@Override
public Distribution read(final Path file, final Distribution.Method method, final LoginCallback prompt) throws BackgroundException {
  final Path container = containerService.getContainer(file);
  final URI origin = URI.create(String.format("%s://%s.%s", method.getScheme(), container.getName(), this.getHostname()));
  try {
    final WebsiteConfig configuration = session.getClient().getWebsiteConfigImpl(container.getName());
    final Distribution distribution = new Distribution(
        origin, method, configuration.isWebsiteConfigActive());
    distribution.setUrl(URI.create(String.format("%s://%s.%s", method.getScheme(), container.getName(), this.getHostname())));
    distribution.setStatus(LocaleFactory.localizedString("Deployed", "S3"));
    distribution.setIndexDocument(configuration.getIndexDocumentSuffix());
    final DistributionLogging logging = this.getFeature(DistributionLogging.class, method);
    if(logging != null) {
      final LoggingConfiguration c = new GoogleStorageLoggingFeature(session).getConfiguration(container);
      distribution.setLogging(c.isEnabled());
      distribution.setLoggingContainer(c.getLoggingTarget());
      distribution.setContainers(new S3BucketListService(session).list(
          new Path(String.valueOf(Path.DELIMITER), EnumSet.of(Path.Type.volume, Path.Type.directory)), new DisabledListProgressListener()).toList());
    }
    return distribution;
  }
  catch(ServiceException e) {
    // Not found. Website configuration is disabled.
    final Distribution distribution = new Distribution(origin, method, false);
    distribution.setStatus(e.getErrorMessage());
    distribution.setUrl(URI.create(String.format("%s://%s.%s", method.getScheme(), container.getName(), this.getHostname())));
    return distribution;
  }
}
org.jets3t.serviceServiceExceptiongetErrorMessage

Popular methods of ServiceException

  • getMessage
  • getCause
  • getErrorCode
  • <init>
    Create a service exception that includes an underlying cause exception.
  • getResponseCode
  • getResponseHeaders
  • getResponseStatus
  • printStackTrace
  • setErrorCode
    Set the exception's error code; for internal use only.
  • setErrorMessage
    Set the exception's error message; for internal use only.
  • findXmlElementText
  • getRequestHost
  • findXmlElementText,
  • getRequestHost,
  • getRequestPath,
  • getRequestVerb,
  • getResponseDate,
  • getXmlMessage,
  • getXmlMessageAsBuilder,
  • isParsedFromXmlMessage,
  • parseXmlMessage

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • IsNull (org.hamcrest.core)
    Is the value null?
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now