From 5ff05b9832763424814b1939bb8b426bb26022f2 Mon Sep 17 00:00:00 2001 From: Shubhanshu Pratap Singh Date: Mon, 26 Nov 2018 09:48:12 +0530 Subject: [PATCH] add advantage of exception handling to the article (#23434) * add advantage of exception handling to the article * Fixed formatting --- guide/english/java/exception-handling/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guide/english/java/exception-handling/index.md b/guide/english/java/exception-handling/index.md index 7c8bf98615..ff6f9220f3 100644 --- a/guide/english/java/exception-handling/index.md +++ b/guide/english/java/exception-handling/index.md @@ -16,7 +16,7 @@ All exception and errors types are sub classes of class Throwable, which is base ## How to use try-catch clause -``` +```java try { // block of code to monitor for errors // the code you think can raise an exception @@ -32,3 +32,5 @@ finally { // block of code to be executed after try block ends } ``` +## Advantage of Exception Handling +The core advantage of exception handling is to maintain the normal flow of the application. An exception normally disrupts the normal flow of the application which is why we use exception handling.