Added a Try-Catch block to the getSetting method

 I have added the Try block for the getSetting method as requested along with an console.log message in the Catch in case this fails.