net.roboconf.core.utils.Utils.writeException()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(83)

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

Utils.writeException介绍

[英]Writes an exception's stack trace into a string.

#logException(Logger,Exception) has better performances and should be used for logging purpose.
[中]将异常的堆栈跟踪写入字符串。
#logException(Logger,Exception)具有更好的性能,应该用于日志记录。

代码示例

代码示例来源:origin: net.roboconf/roboconf-iaas-azure

private String getStringFromInputStream( InputStream in ) {
  String result = "";
  ByteArrayOutputStream os = new ByteArrayOutputStream();
  try {
    Utils.copyStream( in, os );
    result = os.toString( "UTF-8" );
  } catch( IOException e ) {
    this.logger.severe( e.getMessage());
    this.logger.finest( Utils.writeException( e ));
  }
   return result;
}

代码示例来源:origin: net.roboconf/roboconf-iaas-in-memory

@Override
  public void run() {
    try {
      File tempDir = new File( System.getProperty( "java.io.tmpdir" ));
      agentLauncher.launchAgent( ExecutionLevel.RUNNING, tempDir );
    } catch( IOException e ) {
      Logger logger = Logger.getLogger( getClass().getName());
      logger.severe( "An error occurred in an agent (in-memory). " + e.getMessage());
      logger.finest( Utils.writeException( e ));
    }
  };
}.start();

代码示例来源:origin: net.roboconf/roboconf-iaas-openstack

this.logger.finest( Utils.writeException( e ));
throw new IaasException( e );

相关文章

微信公众号

最新文章

更多