Improve minifier;py exception catch