Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions 1-js/10-error-handling/2-custom-errors/1-format-error/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ importance: 5

---

# Inherit from SyntaxError
# Herde de SyntaxError

Create a class `FormatError` that inherits from the built-in `SyntaxError` class.
Crie uma classe `FormatError` que herda da classe nativa `SyntaxError`.

It should support `message`, `name` and `stack` properties.
Ela deve suportar as propriedades `message`, `name` e `stack`.

Usage example:
Exemplo de uso:

```js
let err = new FormatError("formatting error");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Código do exemplo ficou em inglês: na linha 21, // true (because inherits from SyntaxError) → sugestão // true (porque herda de SyntaxError). Também vale considerar traduzir a string "formatting error" (linhas 14/16 e solution.md), já que o artigo traduz as mensagens dos exemplos ("Opa!", "Faltando o campo: ..."). Se traduzir, atualizar o solution.md junto.

Expand Down
Loading