[plt-scheme] raise error
Hello there!
I am using the (error str v ...) function to raise exceptions in
error cases. But I wonder about the result when i print the error
message.
The following is the result in the interaction window of DrScheme:
> (with-handlers ([exn? (lambda (exn) (write (exn-message exn)))])
(error "First part" "second part"))
"First part \"second part\""
I would have had expected:
"First part second part"
Why is it that the second and any subsequent strings are escaped? It
seams that all parameters following the initial String are inserted
into this string and not concatenated as described in the
documentation. Only non string values are really concatenated.
Is this a known problem, is there something I am doing wrong or I
misinterpret the documentation. Is there a better way to do this?
Mostly the error text is somthing like the following: (error "The "
limit-type "was exceeded by" anything) where the symbols resolve to
symbols, numbers or strings.
Any help would be appreciated.
Best Regards,
Rainer