225A. (1) Whoever, being a public servant legally bound as such public servant to apprehend or to keep in confinement any person in any case not provided for in section 221, 222 or 223, or in any other law for the time being in force, omits to apprehend that person or suffers him to escape from confinement shall be punished—

(a) if he does so intentionally, with imprisonment for a term which may extend to three years or with fine or with both; or

(b) if he does so negligently, with imprisonment for a term which may extend to two years or with fine or with both.

(2) Whoever, in any case not provided for in section 224 or 225, or in any other law for the time being in force, intentionally offers any resistance or illegal obstruction to the lawful apprehension of himself or of any other person, or escapes or attempts to escape from any custody in which he is lawfully detained, or rescues or attempts to rescue any other person from any custody in which that person is lawfully detained, shall be punished with imprisonment for a term which may extend to six months or with fine or with both.