{"id":88403,"date":"2017-07-06T16:57:50","date_gmt":"2017-07-06T16:57:50","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=88403"},"modified":"2021-07-16T14:14:59","modified_gmt":"2021-07-16T14:14:59","slug":"exception-handling-lightning-component","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/","title":{"rendered":"Exception Handling In Lightning Component"},"content":{"rendered":"\n<p>In this blog we will learn about&nbsp;Exception Handling In Lightning Component<b>.<\/b><\/p>\n\n\n\n<p><strong>What is Exception and Exception Handling?<\/strong><\/p>\n\n\n\n<p>Exception is an event which occur during execution of &nbsp;program instruction&nbsp;and disrupts the normal flow of program instructions. Exception handling is a mechanism to handle exception so that normal flow of program should be maintained.<\/p>\n\n\n\n<p>Steps to perform the Exception Handling is mentioned below.<\/p>\n\n\n\n<div class=\"wk-index-wrap\"><h3 class=\"index-title\">Steps:<\/h3><\/div><div class=\"margin-bottom-50\">\n<p>1). Create the lightning component to show the exception.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:xml\">&lt;-- errorComponent --&gt;\n&lt;aura:component&gt;\n&lt;!-- \n    \/**\n     * Webkul Software.\n     *\n     * @category  Webkul\n     * @author    Webkul\n     * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\n     * @license   https:\/\/store.webkul.com\/license.html\n     *\/\n --&gt;\t\n    &lt;aura:attribute name=\"errorMsg\" type=\"String\"&gt;&lt;\/aura:attribute&gt;\n    &lt;aura:attribute name=\"title\" type=\"String\"&gt;&lt;\/aura:attribute&gt;\n    &lt;div class=\"wk_model_bg\"&gt;&lt;\/div&gt;\n    &lt;section role=\"dialog\"  aria-labelledby=\"header\" aria-describedby=\"errMsg\" class=\"slds-modal slds-fade-in-open\"&gt;\n        &lt;div class=\"slds-modal__container \" aura:id=\"ErrorBox\" &gt;\n            &lt;div class=\"slds-modal__header\" aura:id =\"errHeader\"&gt;\n                &lt;lightning:buttonIcon aura:id=\"clsBtn\" iconName=\"utility:close\" alternativeText=\"Close\" class=\"slds-button slds-button--neutral slds-p-horizontal--xx-small slds-m-right--x-small slds-float--right\" onclick=\"{!c.myAction}\"&gt;     \n                &lt;\/lightning:buttonIcon&gt; \n                &lt;h2 id=\"header\" class=\"slds-text-heading--medium wk_text\"&gt;{!v.title}&lt;\/h2&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"myAction slds-p-around--large\" aura:id =\"errMsg\" style=\"background:#f4f6f9\"&gt;\n                {!v.errorMsg}\n            &lt;\/div&gt;\n        &lt;\/div&gt;\n    &lt;\/section&gt;\n    \n&lt;\/aura:component&gt;\n<\/pre>\n\n\n\n<p>2). Create a client site controller for errorComponent.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:js\">({\n   \/**\n    * Webkul Software.\n    *\n    * @category  Webkul\n    * @author    Webkul\n    * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\n    * @license   https:\/\/store.webkul.com\/license.html\n    *\/\n\tmyAction : function(component, event, helper) {\n        component.destroy();\n    }\n})\n<\/pre>\n\n\n\n<p>3). Here is code for button which action is to delete Account record which can not be deleted because it is associated with the case.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:xml\">&lt;!-- deleteAccount --&gt;\n&lt;!-- \n\/**\n* Webkul Software.\n*\n* @category  Webkul\n* @author    Webkul\n* @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\n* @license   https:\/\/store.webkul.com\/license.html\n*\/\n--&gt;\n\n&lt;aura:component controller = \"accListJsClass\"&gt;\n      &lt;div aura:id=\"errorDialogPlaceholder\" &gt;\n    \t{!v.body}\n      &lt;\/div&gt;\n        &lt;div class=\"slds-col slds-size_1-of-8 allBtn\"&gt;\n            &lt;lightning:button label=\"Delete Account\"\n                                     iconName=\"utility:delete\"\n                                     iconPosition=\"left\"\n                                     variant=\"destructive\"\n                                     onclick=\"{!c.deleteSlctd}\"&gt;\n            &lt;\/lightning:button&gt;\n        &lt;\/div&gt;\n&lt;\/aura:component&gt;<\/pre>\n\n\n\n<p>4).Create a client site controller for deleteAccount.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:js\">({\n        \/**\n         * Webkul Software.\n         *\n         * @category  Webkul\n         * @author    Webkul\n         * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\n         * @license   https:\/\/store.webkul.com\/license.html\n         *\/\n        deleteSlctd : function(component,event,helper) {\n        var getCheckAllId = component.find(\"cboxRow\");\n        var selctedRec = [];\n        for (var i = 0; i &lt; getCheckAllId.length; i++) {\n            \n            if(getCheckAllId[i].get(\"v.value\") == true )\n            {\n                selctedRec.push(getCheckAllId[i].get(\"v.text\")); \n            }\n        }\n        helper.deleteSelected(component,selctedRec);\n    }\n})<\/pre>\n\n\n\n<p>5). Create a Helper for deleteAccount.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:js\">({\n   \/**\n    * Webkul Software.\n    *\n    * @category  Webkul\n    * @author    Webkul\n    * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\n    * @license   https:\/\/store.webkul.com\/license.html\n    *\/\n    deleteSelected : function(component,selctedRec){\n        var action = component.get(\"c.delSlctRec\");\n        action.setParams({\n            \"slctRec\": selctedRec\n        });\n        action.setCallback(this, function(response){\n            var state =  response.getState();\n            if(state == \"SUCCESS\")\n            {\n                var errorMsg = \"Successfully Deleted\";\n                var error = \"Success\";\n                $A.createComponent(\n                    \"c:errorComponent\",\n                    {\n                      \"errorMsg\": errorMsg,\n                        \"title\" : error\n                     },\n                    function(errComponent){\n                        if (component.isValid()) {\n                            var targetComp = component.find(\"errorDialogPlaceholder\");\n                            var body = component.get(\"v.body\");\n                            body.push(errComponent);\n                            component.set(\"v.body\", body);             \n                        }\n                    }            \n                );\n            } else if (state==\"ERROR\") {\n                var errorMsg = action.getError()[0].message;\n                console.log(errorMsg);\n                var error = \"Error\";\n                $A.createComponent(\n                    \"c:errorComponent\",\n                    {\n                      \"errorMsg\": errorMsg,\n                        \"title\" : error\n                     },\n                    function(errComponent){\n                        if (component.isValid()) {\n                            var targetComp = component.find(\"errorDialogPlaceholder\");\n                            var body = component.get(\"v.body\");\n                            body.push(errComponent);\n                            component.set(\"v.body\", body);             \n                        }\n                    }            \n                );\n            }\n        });\n        $A.enqueueAction(action);\n    }\n})<\/pre>\n\n\n\n<p>6). Create apex class to perform the delete operation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:js\">public class accListJsClass{\n    \/**\n    * Webkul Software.\n    *\n    * @category  Webkul\n    * @author    Webkul\n    * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\n    * @license   https:\/\/store.webkul.com\/license.html\n    *\/\n\n    @AuraEnabled \n    public List&lt;Account&gt; delRec = new List&lt;Account&gt;();\n    \n    @AuraEnabled \n    public static List&lt;Account&gt; delSlctRec(List&lt;String&gt; slctRec)\n    {\n        accListJsClass alc = new accListJsClass();\n        \/\/ Id is for demo purpose only \n        alc.delRec = [SELECT Id FROM Account WHERE Id = '0017F000006PUEaQAO' ]; \n        try{\n           delete alc.delRec;\n        } catch(Exception ex)\n        {\n            throw new AuraHandledException(ex.getMessage());\n        }\n       \n    }\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wk-index-wrap\"><h3 class=\"index-title\">Output:<\/h3><\/div><div class=\"margin-bottom-50\">\n<figure class=\"wp-block-image\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Lightning-Experience-Salesforce-5.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" width=\"1301\" height=\"678\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Lightning-Experience-Salesforce-5.jpg\" alt=\"\" class=\"wp-image-88618\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Lightning-Experience-Salesforce-5.jpg 1301w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Lightning-Experience-Salesforce-5-250x130.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Lightning-Experience-Salesforce-5-300x156.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Lightning-Experience-Salesforce-5-768x400.jpg 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Lightning-Experience-Salesforce-5-1200x625.jpg 1200w\" sizes=\"(max-width: 1301px) 100vw, 1301px\" loading=\"lazy\" \/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wk-index-wrap\"><h3 class=\"index-title\">\nFor pagination in lightning component Click Here.\nFor mass delete in lightning component\u00a0Click Here.\nTo create Dynamic Component on button click\u00a0Click Here.\n<\/h3><\/div>\n\n\n\n<div class=\"wk-index-wrap\"><h3 class=\"index-title\">Support<\/h3><\/div><div class=\"margin-bottom-50\">\n<p>That\u2019s all for implementation of Exception Handling in lightning component, still if you have any further query or seek assistance to make your salesforce classic apps compatible with lightning experience, feel free to add a ticket, we will be happy to help you .&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this blog we will learn about&nbsp;Exception Handling In Lightning Component. What is Exception and Exception Handling? Exception is an event which occur during execution of &nbsp;program instruction&nbsp;and disrupts the normal flow of program instructions. Exception handling is a mechanism to handle exception so that normal flow of program should be maintained. Steps to perform <a href=\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":145,"featured_media":88623,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1889,1887,1],"tags":[4974,5023,5024],"class_list":["post-88403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apex","category-salesforce","category-uncategorized","tag-exception","tag-exception-handling-in-lightning-component","tag-server-side-exception-handling"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Exception Handling In Lightning Component - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Exception is an event which occur during execution of \u00a0program instruction\u00a0and disrupts the normal flow of program instructions. Exception handling is a mechanism to handle exception so that normal flow of program should be maintained.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exception Handling In Lightning Component - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Exception is an event which occur during execution of \u00a0program instruction\u00a0and disrupts the normal flow of program instructions. Exception handling is a mechanism to handle exception so that normal flow of program should be maintained.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-06T16:57:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-16T14:14:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Snehil Jaiswal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Snehil Jaiswal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/\"},\"author\":{\"name\":\"Snehil Jaiswal\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/e7e387ae1eb38a5dd56c53c2daf848d1\"},\"headline\":\"Exception Handling In Lightning Component\",\"datePublished\":\"2017-07-06T16:57:50+00:00\",\"dateModified\":\"2021-07-16T14:14:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/\"},\"wordCount\":209,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png\",\"keywords\":[\"exception\",\"Exception Handling in Lightning Component\",\"Server Side Exception Handling\"],\"articleSection\":[\"Apex\",\"Salesforce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/\",\"url\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/\",\"name\":\"Exception Handling In Lightning Component - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png\",\"datePublished\":\"2017-07-06T16:57:50+00:00\",\"dateModified\":\"2021-07-16T14:14:59+00:00\",\"description\":\"Exception is an event which occur during execution of \u00a0program instruction\u00a0and disrupts the normal flow of program instructions. Exception handling is a mechanism to handle exception so that normal flow of program should be maintained.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exception Handling In Lightning Component\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/e7e387ae1eb38a5dd56c53c2daf848d1\",\"name\":\"Snehil Jaiswal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4bca6424a95aaafa9ab0ddc940099d65d20ab159fbcec826869a62578336590d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4bca6424a95aaafa9ab0ddc940099d65d20ab159fbcec826869a62578336590d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Snehil Jaiswal\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/snehil-jaiswal901\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Exception Handling In Lightning Component - Webkul Blog","description":"Exception is an event which occur during execution of \u00a0program instruction\u00a0and disrupts the normal flow of program instructions. Exception handling is a mechanism to handle exception so that normal flow of program should be maintained.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/","og_locale":"en_US","og_type":"article","og_title":"Exception Handling In Lightning Component - Webkul Blog","og_description":"Exception is an event which occur during execution of \u00a0program instruction\u00a0and disrupts the normal flow of program instructions. Exception handling is a mechanism to handle exception so that normal flow of program should be maintained.","og_url":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-07-06T16:57:50+00:00","article_modified_time":"2021-07-16T14:14:59+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png","type":"image\/png"}],"author":"Snehil Jaiswal","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Snehil Jaiswal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/"},"author":{"name":"Snehil Jaiswal","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/e7e387ae1eb38a5dd56c53c2daf848d1"},"headline":"Exception Handling In Lightning Component","datePublished":"2017-07-06T16:57:50+00:00","dateModified":"2021-07-16T14:14:59+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/"},"wordCount":209,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png","keywords":["exception","Exception Handling in Lightning Component","Server Side Exception Handling"],"articleSection":["Apex","Salesforce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/","url":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/","name":"Exception Handling In Lightning Component - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png","datePublished":"2017-07-06T16:57:50+00:00","dateModified":"2021-07-16T14:14:59+00:00","description":"Exception is an event which occur during execution of \u00a0program instruction\u00a0and disrupts the normal flow of program instructions. Exception handling is a mechanism to handle exception so that normal flow of program should be maintained.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-3.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/exception-handling-lightning-component\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Exception Handling In Lightning Component"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/e7e387ae1eb38a5dd56c53c2daf848d1","name":"Snehil Jaiswal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4bca6424a95aaafa9ab0ddc940099d65d20ab159fbcec826869a62578336590d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4bca6424a95aaafa9ab0ddc940099d65d20ab159fbcec826869a62578336590d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Snehil Jaiswal"},"url":"https:\/\/webkul.com\/blog\/author\/snehil-jaiswal901\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/88403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/145"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=88403"}],"version-history":[{"count":12,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/88403\/revisions"}],"predecessor-version":[{"id":296721,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/88403\/revisions\/296721"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/88623"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=88403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=88403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=88403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}