If in any prosecution under this chapter it appears to the court that the offence charged is, in the particular case, of a trifling or merely technical nature, or that in the particular circumstances it is inexpedient to proceed to a conviction, the court may in its discretion, and for reason stated on the application of the accused, dismiss the case; but the court may, if it thinks fit, make the order mentioned in section 442I .