A developer wrote the following code:
01 let X = object.value;
02
03 try {
04 handleObjectValue(X);
05 } catch (error) {
06 handleError(error);
07 }
Thedeveloper has a getNextValue function to execute after handleObjectValue(), but
does not want to execute getNextValue() if an error occurs.
How can the developer change the code to ensure this behavior?
Submit