skip to Main Content

Does Javascript’s Fetch catch errors?

I am learning JavaScript api project, fetch, then, catch . I coded along with a YouTube JavaScript api project. Every time I try it, 'catch' is not working. let searchBtn=document.getElementById("search-btn"); let countryInp=document.getElementById("country-inp"); searchBtn.addEventListener("click", ()=>{ let countryName=countryInp.value; let finalURL=`https://restcountries.com/v3.1/name/${countryName}?fullText=true`; console.log(finalURL); fetch(finalURL)…

VIEW QUESTION

Android Studio – Infinite loop on try catch java Android Studio

I got stuck on infinite loop when all if statement is true UserRepo class public int update(Users user) throws ExecutionException, InterruptedException { Callable<Integer> updateCallable = new Callable<Integer>() { @Override public Integer call() throws Exception { return sqlite_room_dao.update(user.getId(),user.getUsername(),user.getPassword(),user.getPassword2()); } }; Future<Integer>…

VIEW QUESTION
Back To Top
Search