GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update code style · HowProgrammingWorks/Errors@f31f5ab

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • JavaScript
    • 4-uncaught.js
    • 5-promise.js
    • 6-async-await.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎JavaScript/4-uncaught.js‎

Copy file name to clipboardExpand all lines: JavaScript/4-uncaught.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
process.on('uncaughtException', err => {
3+
process.on('uncaughtException', (err) => {
44
console.log('on uncaughtException: ' + err.message);
55
process.exit(1);
66
});
Collapse file

‎JavaScript/5-promise.js‎

Copy file name to clipboardExpand all lines: JavaScript/5-promise.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ const sum = (a, b) => new Promise((resolve, reject) => {
99
});
1010

1111
sum(2, 3)
12-
.then(data => {
12+
.then((data) => {
1313
console.log(data);
1414
})
15-
.catch(err => {
15+
.catch((err) => {
1616
console.log(err.message);
1717
});
1818

1919
sum(7, 'A')
20-
.then(data => {
20+
.then((data) => {
2121
console.log(data);
2222
})
23-
.catch(err => {
23+
.catch((err) => {
2424
console.log(err.message);
2525
});
2626

Collapse file

‎JavaScript/6-async-await.js‎

Copy file name to clipboardExpand all lines: JavaScript/6-async-await.js
+6-7Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ const sum = async (a, b) => {
2222
console.log(err.message);
2323
}
2424

25-
/*
25+
/*
2626
console.log(await sum(7, 'A'));
2727
28-
UnhandledPromiseRejectionWarning: Error: a and b should be numbers
29-
30-
DeprecationWarning: Unhandled promise rejections are deprecated.
31-
In the future, promise rejections that are not handled will terminate
32-
the Node.js process with a non-zero exit code.
33-
*/
28+
UnhandledPromiseRejectionWarning: Error: a and b should be numbers
3429
30+
DeprecationWarning: Unhandled promise rejections are deprecated.
31+
In the future, promise rejections that are not handled will terminate
32+
the Node.js process with a non-zero exit code.
33+
*/
3534
})();

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.