Unplug your mobile device immediately and use an air duster with compressed cool air and spray well the connectors on your tablet/phone and the cable connector of the charger… after 3-5 min retry the charging of the mobile device.
Follow a picture of air duster and the tablet screenshot of the error you will face for this.