aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMaxime Dénès2017-01-30 15:11:17 +0100
committerMaxime Dénès2017-01-30 15:11:17 +0100
commita0fb4f60bb328935da053250e7964150fdf57a86 (patch)
tree2e15c5292461a2719309e49bf25e0b0900175985 /kernel
parenta6f687852c0c7509a06fdf16c0af29129b3566d5 (diff)
parent86116b181bb866c7f63a37796e1388f731ce7204 (diff)
Merge PR#408: [native comp] Improve error message on linking error.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/safe_typing.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/safe_typing.ml b/kernel/safe_typing.ml
index 8b28cd87bd..7e28b1c567 100644
--- a/kernel/safe_typing.ml
+++ b/kernel/safe_typing.ml
@@ -795,7 +795,10 @@ type compiled_library = {
type native_library = Nativecode.global list
let get_library_native_symbols senv dir =
- DPMap.find dir senv.native_symbols
+ try DPMap.find dir senv.native_symbols
+ with Not_found -> Errors.errorlabstrm "get_library_native_symbols"
+ Pp.((str "Linker error in the native compiler. Are you using Require inside a nested Module declaration?") ++ fnl () ++
+ (str "This use case is not supported, but disabling the native compiler may help."))
(** FIXME: MS: remove?*)
let current_modpath senv = senv.modpath