--- title: "Advanced Block" slug: "advanced-block" updated: 2022-08-22T07:17:58Z published: 2022-08-22T07:17:58Z canonical: "help.pillir.io/advanced-block" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # Advanced Block ## Try Catch: - The try statement lets you test a block of statements for errors. - The catch statement lets you handle the error. The catch statement has an inbuilt error variable that can be used for diagnosing. - The final statement lets you execute code, after trying and catching, regardless of the result. | **Block Layout** | **Generated Code** | | --- | --- | | ![TryCatch](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/TryCatch.png) | ```javascript try{ } catch(err){ } finally { } ``` | ## Regular Expression: Expressions are used to evaluate any code block to a particular value. They can exist anywhere within an argument or function invocation block where the code expects a return value. A regular expression can be matched, texted, or executed by specifying the expression path and input values. | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Choose the type of Text matching (match, test, exec) Regex format as a variable or Text, Input data as a variable or Text. | For match returns matching text else null, For test returns true or false, depending on the result, For exec returns the found text as an object else null. | ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1620913349102.png) ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1620913326276.png) | ```javascript pillirFunctions. regular_expression ("match", /expression/g, 'input') ``` | ## Set Timeout: This block is used to set a particular time | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Time in milliseconds as a variable or number, Callback Function as a statement block. | Returns a number, representing the ID value of the timer that is set. | ![SetTimeout](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/SetTimeout.png) | ```javascript setTimeout(function(){}) ``` | ## Set Interval: | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Time in milliseconds as a variable or number, Callback Function as a statement block. | Returns a number, representing the ID value of the timer that is set. | ![SetInterval](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/SetInterval.png) | ```javascript setInterval(function(){}, 10) ``` | ## Clear Time-Interval: | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | The ID value of the timer as variable or number. | Clears a timer set with the set Interval block using interval id. | ![ClearInterval](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ClearInterval.png) | ```javascript clearInterval(id) ``` | ## ClearTimeout: | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | The ID value of the timer as variable or number. | Clears a timer set with the set timeout block using timeout id. | ![ClearTimeout](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ClearTimeout.png) | ```javascript clearTimeout(id) ``` | #### ## JSON Parser: | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | JSON value as variable or Text. | Returns JSON Object corresponding input text JSON. | ![JSONParse](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/JSONParse.png) | ```javascript pillirFunctions. json_parse('{}') ``` | #### ## JSON Stringify: | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | JSON Object as variable or Object value. | Returns Text JSON corresponding input JSON Object. | ![JSONStringify](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/JSONStringify.png) | ```javascript pillirFunctions. json_stringify(value) ``` |