0% found this document useful (0 votes)
17 views3 pages

1-20 Questionnaire

The document consists of a quiz on error handling in website development, specifically focusing on JavaScript error management techniques. It includes multiple-choice questions covering topics such as syntax errors, try-catch blocks, and custom error classes. The quiz aims to assess understanding of various error handling concepts and practices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views3 pages

1-20 Questionnaire

The document consists of a quiz on error handling in website development, specifically focusing on JavaScript error management techniques. It includes multiple-choice questions covering topics such as syntax errors, try-catch blocks, and custom error classes. The quiz aims to assess understanding of various error handling concepts and practices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

BTLED ICT 18/19 – WEBSITE DEVELOPMENT

Chapter 10 – Error Handling GROUP 10


_____ / _____ / _____
(Last Name) (First Name) (MI) Date / Month / Year

I. Write the letter of your answer on the blank space provided. (1 point each)

1.) These errors occur on the reading phase and are unrecoverable (from the inside code).
a. parse-time
b. syntax error
c. incorrect data
d. reference error

2.) It only handles errors that occur in valid code.


a. error object
b. try…catch
c. type…catch
d. error…catch

3.) It’s used to decode data received over the network, from the server or another source.
a. JSUN.parse
b. JSAN.parse
c. JSON.parse
d. JSIN.parse

4.) It gets all errors from try and should only process errors that it knows and “rethrow’’ all others.
a. rethrow
b. throw
c. read data
d. catch

5.) It only knows how to handle SyntaxError.


a. throw
b. readData
c. catch
d. rethrow

6.) This outer knows how to handle everything.


a. throw
b. readData
c. try…catch
d. rethrow

7.) This clause is often used when we start doing something and want to finalize it in any case of outcome.
a. process
b. complete
c. result
d. finally

Page 1 of 3
8.) A string with information about the sequence of nested calls that led to the error.
a. stack
b. message
c. name
d. variable

9.) It is a very important pattern of error handling.


a. readData
b. try…catch
c. rethrowing
d. throw

10) It is an error object inheriting from the built-in error class.


a. readData
b. try…catch
c. rethrowing
d. throw

11) It only knows how to handle validation and syntax errors, other kinds (caused by a typo in the code or
other unknown reasons) should fall through.
a. catch block
b. try…catch
c. name
d. subtype

12) The purpose of the function of this code is “ to read the user data”.
a. user data
b. readUser
c. read data
d. read error

13) It is a widespread technique: a function handles low-level exceptions and creates higher-level errors
instead of various low-level ones.
a. low-level exceptions
b. instanceof
c. high-level exceptions
d. wrapping exceptions

14) This sometimes becomes properties of that object like err.cause but that’s not strictly required.
a. low-level exceptions
b. instanceof
c. high-level exceptions
d. wrapping exceptions

15) This can be use to check particular errors. It also works with inheritance.
a. low-level exceptions
b. instanceof
c. high-level exceptions
d. wrapping exceptions

Page 2 of 3
16) This property can be used for such checks.
a. property
b. message
c. name
d. read data

17) What method must be called within the constructor of a child class that extends Error?
a. super
b. constructor
c. init
d. error

18) When creating a custom error class like ValidatorError, which property is typically reset to match the
class name?
a. message
b. name
c. statusCode
d. cause

19) What does the cause property in a custom error class like ReadError represent?
a. The stack trace of the error.
b. A user-friendly error message.
c. The original error that triggered the custom error.
d. The status code of the error.

20) Which method can be used to handle multiple types of errors more efficiently?
a. JSON.parse
b. throw new Error
c. alert
d. try…catch

Page 3 of 3

You might also like