Skip to content

Commit 38b5cf0

Browse files
authored
Merge pull request #1258 from Umuzi-org/deploy-testtt
added stuff
2 parents d264dce + 78f460c commit 38b5cf0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

content/common-problems/js-errors/_index.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ try {
1616
}
1717
```
1818

19-
Basically that says: Squash the error, log it, and move on. There are situations where that is the right thing to do. 99% of the time it's the wrong thing to do.
19+
Basically that says: Squash the error, log it, and move on. There are situations where that is the right thing to do. 99% of the time it's the wrong thing to do.
2020

2121
Did you know that errors were implemented by very clever people? They were implemented in Javascript, Python, C#, Java, Clojure, Go and basically all languages because they are actually really useful. Always imagine how the code might be used in a larger application. If you are logging your errors to the console then any calling code would need to monitor the console logs in order to know if there was an error and figure out what to do about it. This would be insane.
2222

@@ -30,7 +30,7 @@ This is also fairly common:
3030

3131
```
3232
try {
33-
stuff()
33+
stuff(withstuff)
3434
} catch(err) {
3535
throw err
3636
}
@@ -42,7 +42,7 @@ Of course the following code does the exact same thing:
4242

4343
```
4444
// try {
45-
stuff() // this is the only line that is worth keeping
45+
stuff(withstuff) // this is the only line that is worth keeping
4646
// } catch(err) {
4747
// throw err
4848
// }
@@ -80,9 +80,8 @@ if(typeof number !== 'number') {
8080
}
8181
```
8282

83-
8483
## References
8584

8685
For more info see here:
8786

88-
- {{< contentlink path="topics/javascript-error-handling" >}}
87+
- {{< contentlink path="topics/javascript-error-handling" >}}

0 commit comments

Comments
 (0)