javascript try catch print error message