change error message formatting of #require

Before:
  utop # #require "foo";;
  No such package: foo""
After:
  utop # #require "foo";;
  No such package: foo

The quoted empty string due to %S can be confusing to students.
This commit is contained in:
Maverick Woo 2014-10-17 11:57:32 -04:00
parent ea45f25c73
commit 2116ebdcfc
1 changed files with 1 additions and 1 deletions

View File

@ -605,7 +605,7 @@ let handle_findlib_error = function
| Failure msg ->
Lwt_main.run (print_error msg)
| Fl_package_base.No_such_package(pkg, reason) ->
Lwt_main.run (print_error (Printf.sprintf "No such package: %s%S\n" pkg (if reason <> "" then " - " ^ reason else "")))
Lwt_main.run (print_error (Printf.sprintf "No such package: %s%s\n" pkg (if reason <> "" then " - " ^ reason else "")))
| Fl_package_base.Package_loop pkg ->
Lwt_main.run (print_error (Printf.sprintf "Package requires itself: %s\n" pkg))
| exn ->