Lisp HUG Maillist Archive

The error 'NIL is an illegal type specifier.', was raised while...

Every time a Error is raised I'm getting this strange message:

	The error 'NIL is an illegal type specifier.'
	was raised while signalling the condition 'Illegal HTML-Format: 
illegal tag structure'.

That's very distracting because I'm using lisp-unit for testing and
he don't runs the tests where a error is expected.

I tried to reinstall LispWorks Personal, but it's the same again.

Thanks for any help.

Michael


Re: The error 'NIL is an illegal type specifier.', was raised while...


Michael Bohn <spaceodyssey@gmx.de> writes:
> Every time a Error is raised I'm getting this strange message:

I have no idea why this is happening.

What are you doing more specifically?  Does signaling an error
interactively do the same thing?  For example, in the repl what does

   (error "help me!")

do?

Cheers,
Chris Dean


Re: The error 'NIL is an illegal type specifier.', was raised while...

Unable to parse email body. Email id is 5632

Re: The error 'NIL is an illegal type specifier.', was raised while...

Michael Bohn wrote:

I narrowed things down a little now.
This Macro is causing the error.
Everything is fine if I'm evaluating the defun 'find-tag' BEFORE the 
macro, but when I'm evaluating first the macro 'tag-case' and then the 
defun find-tag the error signaling is broken.
To make it more strange (for me, I'm a lisp beginner), only evaluation 
the macro is ok. Only evaluation both, the macro and defun in the order 
described above will cause the error.

I tested the same thing on my Mac in LispWorks 4.4.6 (Personal Edition) 
and everything seems to work fine there. The error occurs only in the 
Windows version of LispWorks 4.4.6 (Personal Edition).


Macro and Defun:
> ;@testcase
> (defmacro tag-case (tagvar &rest body)
>   (let ((keywords (list 'null 'list 'tag 'string 'else)) (casevar nil) (casekey 'illegal) is-keyword) 
>     (setf (symbol-plist casevar) nil)
>     (mapc (lambda (token)
>             (setf is-keyword (find token keywords)) ;(setf token 'null)
>             (cond (is-keyword (setf casekey is-keyword))
>                   (T (setf (get casevar casekey) (append (get casevar casekey) (list token))))) ;(setf case 'tag token '(bla))
>             ) body)
> 
>   `(cond ((null ,tagvar) (progn ,@(get casevar 'null)))
>          ((listp ,tagvar) (progn ,@(get casevar 'list)))
>          ((tag-p ,tagvar) (progn ,@(get casevar 'tag)))
>          ((stringp ,tagvar) (progn ,@(get casevar 'string)))
>          (T (progn ,@(get casevar 'else)))))
> )
> 
> 
> ;@testcase
> (defun find-tag (tagstruct id)
>   (tag-case tagstruct
>             NULL nil
>             LIST (or (find-tag (first tagstruct) id) (find-tag (rest tagstruct) id))
>             TAG  (cond ((eql (tag-id tagstruct) id) tagstruct) ;ein einzelner tag
>                               (T (find-tag (tag-value tagstruct) id))))
> )
> 
> (error "test")




Updated at: 2020-12-10 08:48 UTC