{"record":{"id":"d4370e66dc1a467f","repo":"apache/hadoop","slug":"exceptions-tostring","errorCode":null,"errorMessage":"exceptions.toString()","messagePattern":"exceptions\\.toString\\(\\)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java","lineNumber":408,"sourceCode":"                              dst + \"' is not a directory\");\n    } catch (FileNotFoundException e) {\n      throw new IOException(\n          \"`\" + dst + \"': specified destination directory \" +\n              \"does not exist\", e);\n    }\n\n    for (Path src : srcs) {\n      try {\n        if (!copy(srcFS, src, dstFS, dst, deleteSource, overwrite, conf))\n          returnVal = false;\n      } catch (IOException e) {\n        gotException = true;\n        exceptions.append(e.getMessage())\n            .append(\"\\n\");\n      }\n    }\n    if (gotException) {\n      throw new IOException(exceptions.toString());\n    }\n    return returnVal;\n  }\n\n  /**\n   * Copy files between FileSystems.\n   *\n   * @param srcFS srcFs.\n   * @param src src.\n   * @param dstFS dstFs.\n   * @param dst dst.\n   * @param deleteSource delete source.\n   * @param overwrite overwrite.\n   * @param conf configuration.\n   * @throws IOException raised on errors performing I/O.\n   * @return true if the operation succeeded.\n   */\n  public static boolean copy(FileSystem srcFS, Path src,","sourceCodeStart":390,"sourceCodeEnd":426,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java#L390-L426","documentation":"Error \"exceptions.toString()\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java:408 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect each exception in the list to find which file operations failed.","Check permissions and existence for each source/destination involved in the copy."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}