David Bremner <
da...@tethera.net> writes:
>
> (lambda (msg)
> (add-header-line! "Erroneous submission!")
> (add-header-line! (format " --> ~a" msg))
> (message (string-append
> "You have an error in your program -- please hit"
> " \"Run\" and debug your code.\n"
> "Email the course staff if you think your code is"
> " fine.\n"
> "(The submission has been saved but marked as"
> " erroneous.)")
> '(ok))
> (message "Handin saved as erroneous." 'final))
>
> This cause the desired dialog box to pop up, but after I press OK I get
> a "Server Error" popup "while evaluating #<evaluator-message>: application: not a procedure".
>
> I don't really understand where the identifier "evaluator-message" is
> defined, it shows up only in the .zo file for handin-server/checker.rkt.
I still don't understand what's going on, but it seems contrary to the
documentation, the return value from the procedure passed as
:user-error-message matters, and apparently it should be a procedure
taking one argument.
If I use the following
:user-error-message (lambda (msg) (message msg '(ok))
(lambda (thing) (message (format "~a" thing) '(ok))))
then I get two popups from the handin client. The first has the error
message, and the second just has #<evaluator-message>.