-
There is a piece of code in IDEA that will throw an exception. If try/catch is not used, there will be an error message. At this time, you need to use try/catch outside this code to catch exceptions.
-
Position the cursor on this code and press the shortcut key [CTRL+ALT+T].
-
Select the try/catch option in the menu that opens.
-
The editor then automatically wraps the try/catch block around that code block. Similar to try/catch/finally blocks and so on.
How does IDEA quickly try/catch
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324148455&siteId=291194637
Recommended
Ranking