Currently if you fail to provide or mis-name the main fn in a
gen-class implementation, you get an error like:

Exception in thread "main" java.lang.UnsupportedOperationException:
net.n01se/main not defined

This is wrong, since the name shouldn't be just "main".  Attached is a
patch to change this error to:

Exception in thread "main" java.lang.UnsupportedOperationException:
net.n01se/TestObj-main not defined

--Chouser

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

diff --git a/src/clj/clojure/genclass.clj b/src/clj/clojure/genclass.clj
index f45f845..d2d10a1 100644
--- a/src/clj/clojure/genclass.clj
+++ b/src/clj/clojure/genclass.clj
@@ -418,7 +418,7 @@
         (. gen goTo end-label)
                                         ;no main found
         (. gen mark no-main-label)
-        (. gen (throwException ex-type (str pkg-name "/" main-name " not defined")))
+        (. gen (throwException ex-type (str pkg-name "/" sname "-" main-name " not defined")))
         (. gen mark end-label)
         (. gen (returnValue))
         (. gen (endMethod))))

Reply via email to