added better error messages inspired by rustc/cargo

but not as good
This commit is contained in:
Mark
2023-10-23 21:48:15 +02:00
parent 62ed8fc2bd
commit ea95a16c30
30 changed files with 557 additions and 260 deletions

View File

@@ -6,10 +6,7 @@ use std::{
use crate::{
data::{self, Data, MersData, MersType, Type},
program::{
self,
run::{CheckError, CheckInfo},
},
program::{self, run::CheckInfo},
};
use super::Config;
@@ -37,7 +34,7 @@ impl Config {
Arc::new(RunCommandErrorT)
]))
} else {
return Err(CheckError(format!("run_command called with invalid arguments (must be (String, Iter<String>))")));
return Err(format!("run_command called with invalid arguments (must be (String, Iter<String>))").into());
}
}),
run: Arc::new(|a, _i| {