Better error logging when emacs errors out.
This commit is contained in:
parent
bd620ccd0d
commit
dc9188dffc
@ -55,7 +55,16 @@ where
|
||||
.arg("--eval")
|
||||
.arg(elisp_script);
|
||||
let out = cmd.output()?;
|
||||
out.status.exit_ok()?;
|
||||
let status = out.status.exit_ok();
|
||||
if status.is_err() {
|
||||
eprintln!(
|
||||
"Emacs errored out: {}\n{}",
|
||||
String::from_utf8(out.stdout)?,
|
||||
String::from_utf8(out.stderr)?
|
||||
);
|
||||
status?;
|
||||
unreachable!();
|
||||
}
|
||||
let org_sexp = out.stderr;
|
||||
Ok(String::from_utf8(org_sexp)?)
|
||||
}
|
||||
@ -98,7 +107,16 @@ where
|
||||
.arg("--eval")
|
||||
.arg(elisp_script);
|
||||
let out = cmd.output()?;
|
||||
out.status.exit_ok()?;
|
||||
let status = out.status.exit_ok();
|
||||
if status.is_err() {
|
||||
eprintln!(
|
||||
"Emacs errored out: {}\n{}",
|
||||
String::from_utf8(out.stdout)?,
|
||||
String::from_utf8(out.stderr)?
|
||||
);
|
||||
status?;
|
||||
unreachable!();
|
||||
}
|
||||
let org_sexp = out.stderr;
|
||||
Ok(String::from_utf8(org_sexp)?)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user