js console try catch