javascript try catch console log error