diff --git a/13_Object_Oriented_Programming/HTML/index.html b/13_Object_Oriented_Programming/HTML/index.html index 6e22336..b1caf88 100644 --- a/13_Object_Oriented_Programming/HTML/index.html +++ b/13_Object_Oriented_Programming/HTML/index.html @@ -17,7 +17,8 @@

Javascript Object

- + + diff --git a/13_Object_Oriented_Programming/Js/53_13_11_Error_Handling.js b/13_Object_Oriented_Programming/Js/53_13_11_Error_Handling.js new file mode 100644 index 0000000..9b96ac0 --- /dev/null +++ b/13_Object_Oriented_Programming/Js/53_13_11_Error_Handling.js @@ -0,0 +1,49 @@ +// * Error Handling + + + +// ReferenceError + +try { + console.log(wilFunction()); + +} catch (error) { + console.log(error.message) + console.log(error.name) + + console.log(error instanceof ReferenceError) + console.log(error instanceof TypeError) +} + + +console.log("+++++++++++++++++++++++") + + +let wil = { + name:"Lider" +} + +try { + console.log(wil.surename)// underfind + if (!surename){ + // throw new SyntaxError("User has no email"); + throw new TypeError("User has no email"); + } +} catch (error) { + console.log(error) + console.log(error.message) + console.log(error.name)//Referance Error +} finally { + console.log("finally block every time using") +} + + + + + + + + + + + diff --git a/Documantation/13_Object_Oriented/documentation.md b/Documantation/13_Object_Oriented/documentation.md index ab85fbe..1fd628d 100644 --- a/Documantation/13_Object_Oriented/documentation.md +++ b/Documantation/13_Object_Oriented/documentation.md @@ -60,4 +60,7 @@ Burada bizə `Object.create()` methodu köməyimizə gəlir. ### Call ,Apply and Bind Function *** -> call methodu vastəsi ilə classın constractorunu çağəra bilir. Call və Apply eyni funksiyanı yerinə yetirir sadəcə **prametr** qəbul edrkən Call prametirləri vergüllərlə ayırır,Apply prametrirləri **array** olaraq əbul edir.Bind isə həmin funksiyanı özəlləşdirərək bizə qatarırır. \ No newline at end of file +> call methodu vastəsi ilə classın constractorunu çağəra bilir. Call və Apply eyni funksiyanı yerinə yetirir sadəcə **prametr** qəbul edrkən Call prametirləri vergüllərlə ayırır,Apply prametrirləri **array** olaraq əbul edir.Bind isə həmin funksiyanı özəlləşdirərək bizə qatarırır. + + + diff --git a/README.md b/README.md index 23502ac..d9f3f6d 100644 --- a/README.md +++ b/README.md @@ -132,4 +132,5 @@ - [Setter Getter](https://github.com/DrMadWill/JavaScript/blob/main/13_Object_Oriented_Programming/Js/51_13_9_Setter_Getter.js) - [My Documantation](https://github.com/DrMadWill/JavaScript/blob/main/Documantation/13_Object_Oriented/documentation.md#encapsulation) - [Call,Apply and Bind Function](https://github.com/DrMadWill/JavaScript/blob/main/13_Object_Oriented_Programming/Js/52_13_10_Call_Applay_Bind_Funciio.js) - - [My Documantation](https://github.com/DrMadWill/JavaScript/blob/main/Documantation/13_Object_Oriented/documentation.md#call-apply-and-bind-function) \ No newline at end of file + - [My Documantation](https://github.com/DrMadWill/JavaScript/blob/main/Documantation/13_Object_Oriented/documentation.md#call-apply-and-bind-function) +- [Error Handling]() \ No newline at end of file