Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Custom errors, extending Error#251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tarasyyyk merged 3 commits intojavascript-tutorial:masterfromdolgachio:master
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,13 +2,13 @@ importance: 5

---

#Inherit from SyntaxError
#Успадкувати від SyntaxError

Create a class`FormatError` that inherits from the built-in `SyntaxError` class.
Створіть клас`FormatError`, який успадковується від вбудованого класу `SyntaxError`.

It should support`message`, `name`and `stack` properties.
Він повинен підтримувати властивості`message`, `name`та `stack`.

Usage example:
Приклад використання:

```js
let err = new FormatError("formatting error");
Expand All@@ -18,5 +18,5 @@ alert( err.name ); // FormatError
alert( err.stack ); // stack

alert( err instanceof FormatError ); // true
alert( err instanceof SyntaxError ); // true (because inherits from SyntaxError)
alert( err instanceof SyntaxError ); // true (оскільки успадковується від SyntaxError)
```
Loading

[8]ページ先頭

©2009-2025 Movatter.jp