Skip to content

Toplevel exception in student code is badly reported/explained #226

@fpottier

Description

@fpottier

If the student raises an exception at the top level, e.g. by writing:

let x = failwith "todo"

then the grader reports a generic error,

Exercice échoué 0 pt
Erreur dans votre solution:

This seems inappropriate. Could learn-ocaml automatically produce a better report, indicating which exception is raised and where?

Incidentally, this would allow us to use let x = failwith "todo" in a template, to represent a hole that the student must fill. Perhaps we could even designate a special-purpose exception ToBeImplemented "foo" so as to indicate such a hole. The grader could then produce a better report, of the form You have not yet implemented foo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: enhancementEnhancement to an existing user-facing feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions