The court may, on its own motion, at any time before judgment is pronounced, arrest the judgment for any of the defects in the accusatory pleading upon which a motion in arrest of judgment may be founded as provided in Section 1185, by order for that purpose entered upon its minutes.