clojure.main
(source)Top-level main function for Clojure REPL and scripts.
For more info about this library see:
https://clojuredocs.org/clojure.corePublic Variable | Short Description |
---|---|
demunge (clj) | Given a string representation of a fn class, as in a stack trace element, returns a readable version. |
err->msg (clj) | Helper to return an error message string from an exception. |
ex-str (clj) | Returns a string from exception data, as produced by ex-triage. |
ex-triage (clj) | Returns an analysis of the phase, error, cause, and location of an error that occurred based on Throwable data, as returned by Throwable->map. |
load-script (clj) | Loads Clojure source from a file or resource given its path. |
main (clj) | Usage: java -cp clojure.jar clojure.main [init-opt*] [main-opt] [arg*] With no options or args, runs an interactive Read-Eval-Print Loop init options: -i, --init path Load a file or resource -e, --eval string Evaluate expressions in string; print non-nil values --report target Report uncaught exception to "file" (default), "stderr", or "none", overrides System property clojure.main.report main options: -m, --main ns-name Call the -main function from a namespace with args -r, --repl Run a repl path Run a script from a file or resource - Run a script from standard input -h, -?, --help Print this help message and exit operation: - Establishes thread-local bindings for commonly set!-able vars - Enters the user namespace - Binds *command-line-args* to a seq of strings containing command line args that appear after any main option - Runs all init options in order - Calls a -main function or runs a repl or script if requested The init options may be repeated and mixed freely, but must appear before any main option. |
renumbering-read (clj) | Reads from reader, which must be a LineNumberingPushbackReader, while capturing the read string. |
repl (clj) | Generic, reusable, read-eval-print loop. |
repl-caught (clj) | Default :caught hook for repl. |
repl-exception (clj) | Returns the root cause of throwables. |
repl-prompt (clj) | Default :prompt hook for repl. |
repl-read (clj) | Default :read hook for repl. |
repl-requires (clj) | A sequence of lib specs that are applied to `require` by default when a new command-line REPL is started. |
report-error (clj) | Create and output an exception report for a Throwable to target. |
root-cause (clj) | Returns the initial cause of an exception or error by peeling off all of its wrappers. |
skip-if-eol (clj) | If the next character on stream s is a newline, skips it, otherwise leaves the stream untouched. |
skip-whitespace (clj) | Skips whitespace characters on stream s. |
stack-element-str (clj) | Returns a (possibly unmunged) string representation of a StackTraceElement. |
with-bindings (clj) | Executes body in the context of thread-local bindings for several vars that often need to be set!: *ns* *warn-on-reflection* *math-context* *print-meta* *print-length* *print-level* *compile-path* *command-line-args* *1 *2 *3 *e. |
with-read-known (clj) | Evaluates body with *read-eval* set to a "known" value, i.e. |