From f6a96579f9e53521c077e90228c27c8f6ab20cd0 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Thu, 7 Mar 2024 12:11:16 +0100 Subject: [PATCH] print useful julia internal server errors --- src/execute/julia.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/execute/julia.ts b/src/execute/julia.ts index 61c80f1534..aec95bdfc4 100644 --- a/src/execute/julia.ts +++ b/src/execute/julia.ts @@ -514,6 +514,19 @@ async function writeJuliaCommand( const json = response.split("\n")[0]; const data = JSON.parse(json); + const err = data.error; + if (err !== undefined) { + const juliaError = data.juliaError ?? "No julia error message available."; + error( + `Julia server returned error after receiving "${command}" command:\n` + + err, + ); + if (!juliaError !== undefined) { + error(juliaError); + } + throw new Error("Internal julia server error"); + } + return data; }