[postmodern-devel] Error when no persistent field
Sven Van Caekenberghe
scaekenberghe at common-lisp.net
Mon Apr 21 16:57:08 UTC 2008
Hi Marijn,
On 21 Apr 2008, at 15:15, Marijn Haverbeke wrote:
> Hi Sven,
>
>> Thanks, did you also handle the case of using get-dao when there
>> are no
>> keys defined ? I believe that got into a loop...
>
> It did -- though some rather bizarre corner case. I've pushed a fix to
> raise an error instead -- calling get-dao on key-less classes is not
> allowed.
>
> Regards,
> Marijn
I know, catching these newbie errors is not the real stuff. I now get:
P1 24 > (defclass foo () ())
#<STANDARD-CLASS FOO 21F6D767>
P1 25 > (get-dao 'foo)
Error: Class FOO has no key slots.
1 (abort) Return to level 0.
2 Return to top loop level 0.
Type :b for backtrace, :c <option number> to proceed, or :? for other
options
This is certainly correct and better than a loop. However, in the
above transcript I even forgot to declare the proper meta class, maybe
that should be the first error being reported. I know I am being
annoying, but I am only trying to help; I promise I will never repeat
this suggestion. Next time, I'll hopefully have a better request.
Sven
More information about the postmodern-devel
mailing list