catch console exception.