Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

init commit

  • Loading branch information...
commit 8a659b82a226caff07034313e6d859d8f7a56cdc 0 parents
Kevin Downey hiredman authored
Showing with 41 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +13 −0 README
  3. +4 −0 project.clj
  4. +19 −0 src/dce/Exception.clj
5 .gitignore
@@ -0,0 +1,5 @@
+pom.xml
+*jar
+/lib/
+/classes/
+.lein-deps-sum
13 README
@@ -0,0 +1,13 @@
+# DCE
+
+an exception for carrying data
+
+## Usage
+
+as you like
+
+## License
+
+Copyright (C) 2011 Kevin Downey
+
+Distributed under the Eclipse Public License, the same as Clojure.
4 project.clj
@@ -0,0 +1,4 @@
+(defproject dataconveyingexception "0.0.1"
+ :description "a DCE"
+ :dependencies [[org.clojure/clojure "1.2.1"]]
+ :aot [dce.Exception])
19 src/dce/Exception.clj
@@ -0,0 +1,19 @@
+(ns dce.Exception
+ (:gen-class :extends RuntimeException
+ :state payload
+ :init init
+ :constructors {[String Throwable clojure.lang.Keyword
+ java.util.Map]
+ [String Throwable]
+ [String clojure.lang.Keyword java.util.Map]
+ [String]
+ [clojure.lang.Keyword java.util.Map]
+ []}))
+
+(defn -init
+ ([message cause type data]
+ [[message cause] (vary-meta data assoc :type type)])
+ ([message type data]
+ [[message] (vary-meta data assoc :type type)])
+ ([type data]
+ [[] (vary-meta data assoc :type type)]))
Please sign in to comment.
Something went wrong with that request. Please try again.