Clojure error reporting is a problem. This gist contains examples of missed opportunities for a clear error message. Let's discuss how common scenarios can be improved, and get some "patch welcome" tickets out there with clearly defined expectations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns example.api.google | |
(:require [cemerick.url :as url] | |
[cheshire.core :as json] | |
[clj-jwt.core :as jwt] | |
[clj-jwt.key :as key] | |
[clj-time.core :as time] | |
[clj-http.client :as http] | |
[clojure.string :as str]) | |
(:import java.io.StringReader)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(comment | |
This is the easiest and most concise way of calling an external process in Java. The inheritIO methods causes the command to output stdout and errout to the same place as your current process (which most of the times is the console), no need to create mechanisms for reading asynchronously from input streams to get at the information. | |
http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html | |
) | |
(def ret (.waitFor (-> (ProcessBuilder. ["gzip" "-t" "g.txt.gz"]) .inheritIO .start))) | |