> I don't quite understand why you got through all that work to get > error-str -- isn't it just (str (qualify-sym error-type))? > > ...and since you then use it only as an arg to 'symbol' or 'str', you > could just use the symbol itself instead of converting it to a string > and back. >
If I bring the symbol back directly, it gets evaluated to the actual error object and not the symbol. I want to compare symbols. Or maybe I don't, comparing symbols in general seems simpler for meta-hacky stuff like this. > > > > This fails when no error is raised, when the wrong error type is raised, > and > > I believe it's captures errors which are derived but not the exact error > (is > > this a weird behavior?). > > I'm not sure, but I think you'd want to allow an implementation to > change to a derived error type without breaking the tests. But I > could be wrong -- it should probably behave the same as the 'throws?' > method, since Java Exceptions also do inheritance. > Good point. Easy enuf. > > > > Much nicer than those ugly Java Exceptions, no? ;) > > Sure, looks good to me. Would it ever be useful to test that the > error has a particular set of arguments? I guess that may be more > detailed than any test would want to get. > Possibly, but I can't think of a really goo reason for this yet. > It would also be interesting to try to test for the existence and > behavior of any 'continue' forms. > Very interesting, I haven't got to continue yet, baby steps here. > > > Really!? I'd never needed it before error-kit, and I'm pretty > suspicious of needing it even there. I think I'd rather just use Vars > for error tags, but they're not currently allowed in the Clojure > inheritance hierarchies. If Vars were Named, I think it would work, > and it's not at all clear to me why they aren't, since they have a > namespace and a name just like symbols and keywords do. Rich is > probably too busy with lazier just now, but I intend to be annoying > about this at some later date. > That's the proper solution. Until then for really wacky stuff, I don't know how to do certain things without qualify-sym. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---