Capturing JS errors thrown on the page to screenshot and ignoring them to prevent polluting the stdout stream and causing invalid images to be created.