Skip to content

Commit

Permalink
feat(error): add screenshot for Error Cause (#1734)
Browse files Browse the repository at this point in the history
* feat(error): add screenshot for Error Cause

* Optimised images with calibre/image-actions

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
azu and github-actions[bot] authored Mar 27, 2024
1 parent 76dd4c1 commit f1b0571
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
Binary file modified source/basic/error-try-catch/img/error-cause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion source/basic/error-try-catch/src/console/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>console.log</title>
<meta charset="UTF-8">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
</head>

<body>
<script src="index.js"></script>
</body>
</html>
</html>
12 changes: 12 additions & 0 deletions source/basic/error-try-catch/src/error-cause/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Error Cause</title>
<meta charset="UTF-8">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
</head>

<body>
<script src="index.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion source/basic/error-try-catch/src/error-cause/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ try {
// 数値にならない文字列 'string' を渡しているので例外が投げられる
sumNumStrings("string", "2");
} catch (err) {
console.error(`エラーが発生しました (${err})`);
console.error(err);
}

0 comments on commit f1b0571

Please sign in to comment.