How does java include fault capture information in detailed messages
This article mainly shows you "how java contains fault capture information in detailed messages", which is easy to understand and well organized. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how java contains fault capture information in detailed messages".
Include fault capture information private OutputStream openOutputStream (File file) throws IOException {if (file.exists ()) {if (file.isDirectory ()) {throw new IOException ("File'" + file + "'exists but is a directory");} if (! file.canWrite ()) {throw new IOException ("File'" + file + "'cannot be written to") in the detailed message }} else {final File parent = file.getParentFile (); if (parent! = null) {if (! parent.mkdirs () & &! parent.isDirectory ()) {throw new IOException ("Directory'" + parent + "'could not be created");}} return new FileOutputStream (file, false);}
In this method, IOException uses different strings to pass different fault capture information.
The above is all the content of the article "how java includes fault capture information in detailed messages". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!