throw error inside try catch js