API for except - clojure-contrib v1.2 (stable)

by Stephen C. Gilardi

Full namespace name: clojure.contrib.except

Overview

Provides functions that make it easy to specify the class, cause, and
message when throwing an Exception or Error. The optional message is
formatted using clojure.core/format.

Public Variables and Functions



throw-arg

function
Usage: (throw-arg & args)
Throws an IllegalArgumentException. All arguments are optional:

      cause? format? format-args*

- cause defaults to nil, if present it must be a Throwable
- format is a format string for clojure.core/format
- format-args are objects that correspond to format specifiers in
  format.
Source


throw-if

function
Usage: (throw-if test & args)
Throws an Exception or Error if test is true. args are those documented
for throwf.
Source


throw-if-not

function
Usage: (throw-if-not test & args)
Throws an Exception or Error if test is false. args are those documented
for throwf.
Source


throwf

function
Usage: (throwf & args)
Throws an Exception or Error with an optional message formatted using
clojure.core/format. All arguments are optional:

    class? cause? format? format-args*

- class defaults to Exception, if present it must name a kind of
  Throwable
- cause defaults to nil, if present it must be a Throwable
- format is a format string for clojure.core/format
- format-args are objects that correspond to format specifiers in
  format.
Source
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.