completed error move.
Some checks failed
MoreThanText/morethantext/pipeline/head There was a failure building this commit

This commit is contained in:
2024-12-01 23:00:07 -05:00
parent 972c4686e0
commit a26471088d
4 changed files with 93 additions and 44 deletions

View File

@@ -1,6 +1,6 @@
pub mod id;
mod record;
mod table;
pub mod table;
use crate::{
data::table::Table,
@@ -47,8 +47,8 @@ impl Database {
fn add_table(&mut self, name: &str, table: Table) -> Result<(), MTTError> {
match self.tables.get(name) {
Some(_) => {
let error = ErrorType::TableRecordInvalidFieldName(name.to_string());
return Err(MTTError::new(error));
let err = DBError::DuplicateTable(name.to_string());
return Err(err.into());
}
None => {}
}