煤烟:Body.getTraps()无法获取方法中的所有陷阱

时间:2019-01-02 02:09:39

标签: soot

源代码如下:

public void init() throws IOException {
Configuration conf = super.getConf();

// Send command to executor which will just start up,
// verify configuration/permissions and exit
try {
  ...
} catch (PrivilegedOperationException e) {
  int exitCode = e.getExitCode();
  LOG.warn("Exit code from container executor initialization is : "
      + exitCode, e);

  throw new IOException("Linux container executor not configured properly"
      + " (error=" + exitCode + ")", e);
}

try {
  ...
} catch (ResourceHandlerException e) {
  LOG.error("Failed to bootstrap configured resource subsystems! ", e);
  throw new IOException(
      "Failed to bootstrap configured resource subsystems!");
}

try {
  ...
} catch (ContainerExecutionException e) {
  throw new IOException("Failed to initialize linux container runtime(s)!");
}

当我使用方法body.getTraps()在catch块中获取所有异常时,它刚刚得到IOException,其他异常(例如ContainerExecutionException)将被忽略。

似乎当代码在catch块中引发异常时,实际由catch块捕获的异常将被忽略。

因此,我认为getTraps()中可能存在Soot错误。

0 个答案:

没有答案