Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/state/learnocaml_store.ml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ module Token = struct

let register ?(allow_teacher=false) token =
if not allow_teacher && is_teacher token then
Lwt.fail (Invalid_argument "Registration of teacher token not allowed")
Lwt.fail
(Invalid_argument "Registration of teacher token forbidden. \
Logout and use a new teacher token?")
else
Lwt.catch (fun () ->
Lwt_io.with_file ~mode:Lwt_io.Output ~perm:0o700 (save_path token)
Expand Down