ch.cyberduck.core.exception.AccessDeniedException.getDetail()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中ch.cyberduck.core.exception.AccessDeniedException.getDetail()方法的一些代码示例,展示了AccessDeniedException.getDetail()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AccessDeniedException.getDetail()方法的具体详情如下:
包路径:ch.cyberduck.core.exception.AccessDeniedException
类名称:AccessDeniedException
方法名:getDetail

AccessDeniedException.getDetail介绍

暂无

代码示例

代码示例来源:origin: iterate-ch/cyberduck

@Override
public String getBookmark() {
  if(StringUtils.isBlank(bookmark)) {
    try {
      bookmark = resolver.create(this);
    }
    catch(AccessDeniedException e) {
      log.warn(String.format("Failure resolving bookmark for %s. %s", this, e.getDetail()));
    }
  }
  return bookmark;
}

代码示例来源:origin: iterate-ch/cyberduck

private void save(final Properties properties) {
  try (OutputStream out = file.getOutputStream(false)) {
    properties.store(out, "Credentials");
  }
  catch(AccessDeniedException e) {
    log.warn(String.format("Failure saving credentials to %s. %s", file.getAbsolute(), e.getDetail()));
  }
  catch(IOException e) {
    log.warn(String.format("Failure saving credentials to %s. %s", file.getAbsolute(), e.getMessage()));
  }
}

代码示例来源:origin: iterate-ch/cyberduck

private Properties load() {
  final Properties properties = new Properties();
  try {
    new DefaultLocalDirectoryFeature().mkdir(file.getParent());
  }
  catch(AccessDeniedException e) {
    log.warn(String.format("Failure saving credentials to %s. %s", file.getAbsolute(), e.getDetail()));
  }
  if(file.exists()) {
    try {
      try (InputStream in = file.getInputStream()) {
        properties.load(in);
      }
    }
    catch(AccessDeniedException e) {
      log.warn(String.format("Failure reading credentials from %s. %s", file.getAbsolute(), e.getDetail()));
    }
    catch(IOException e) {
      log.warn(String.format("Failure reading credentials from %s. %s", file.getAbsolute(), e.getMessage()));
    }
  }
  return properties;
}

代码示例来源:origin: iterate-ch/cyberduck

console.printf("%s%n", e.getDetail(false));
return Exit.failure;

相关文章

微信公众号

最新文章

更多