Skip to content

Commit

Permalink
print useful julia internal server errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Mar 7, 2024
1 parent 2457ec0 commit f6a9657
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/execute/julia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f6a9657

Please sign in to comment.