I know some of you will tell me that I shouldn't use try/catch for control flow. That is fine. I might redo this. But for now, I'd like to simply know why this doesn't work. I have this function:
(defn start [] (let [filenames-as-seq-of-strings (.list (io/file "/home/ec2-user/uploads/"))] (doseq [f filenames-as-seq-of-strings] (println "in file_converter.start, the file is " (str f)) (spit (str "/home/ec2-user/converted_csv_files/" f ".csv") " ") (let [input-file (java.io.File. (str "/home/ec2-user/uploads/" f)) output-file (java.io.File. (str "/home/ec2-user/converted_csv_files/" f ".csv"))] (try (xls/convert input-file output-file) (catch Exception e (println e) (xlsx/convert input-file output-file))))))) Given some Microsoft Excel files, I first try to parse them as xls files, and if that doesn't work, then in the catch block I would like to try to parse them xlsx files. If I run this app in the terminal with "java -jar" I see the exception as I expect. But this line never seems to get called: (xlsx/convert input-file output-file) This convert function starts with: (defn convert "Stealing code from http://stackoverflow.com/questions/31873931/java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-loading-an-xlsx-file" [^java.io.File input-file ^java.io.File output-file] (println "at the start of xlsx") But I never see that println in the terminal. Why not? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.