1-20 Questionnaire
1-20 Questionnaire
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
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
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
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