Skip to content

Commit 3481699

Browse files
committed
Added a better error messade when the MathLinks instalation fails and there is no deps/deps.jl file.
1 parent aea35ad commit 3481699

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/MathLink.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@ using Printf
44

55
export @W_str, @W_cmd, weval
66

7-
include("../deps/deps.jl")
7+
8+
###Checking that the deps.jl file exists. And throwing a readable error if it does not!
9+
if isfile("../deps/deps.jl")
10+
include("../deps/deps.jl")
11+
else
12+
FilePath=@__DIR__
13+
FilePath=FilePath[1:end-4]*"/deps/deps.jl"
14+
error("The file $FilePath does not exist.\n"
15+
*"This usually means that the MathLink installation failed.\n"
16+
*"Have you checked that Mathematica is installed on your system?")
17+
end
818
include("types.jl")
919
include("consts.jl")
1020
include("init.jl")

0 commit comments

Comments
 (0)