summaryrefslogtreecommitdiffstats
path: root/rust/src/bin/fatcat-export.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-09 23:52:37 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-09 23:52:37 -0800
commit67c3460d251a4e559a1126b5fe66fe996f840010 (patch)
tree89f0a5f37809a9b439435b9245844d1da18dc483 /rust/src/bin/fatcat-export.rs
parenta192b0b84e46179a8f28218dfcbb5eb4e28dbf9d (diff)
downloadfatcat-67c3460d251a4e559a1126b5fe66fe996f840010.tar.gz
fatcat-67c3460d251a4e559a1126b5fe66fe996f840010.zip
HUGE refactor of error types (to use failure)
Diffstat (limited to 'rust/src/bin/fatcat-export.rs')
-rw-r--r--rust/src/bin/fatcat-export.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/rust/src/bin/fatcat-export.rs b/rust/src/bin/fatcat-export.rs
index d438c00a..82f40048 100644
--- a/rust/src/bin/fatcat-export.rs
+++ b/rust/src/bin/fatcat-export.rs
@@ -6,9 +6,9 @@
#[macro_use]
extern crate clap;
#[macro_use]
-extern crate error_chain;
-#[macro_use]
extern crate log;
+#[macro_use]
+extern crate failure;
use clap::{App, Arg};
@@ -20,7 +20,6 @@ use fatcat_api_spec::models::*;
use std::str::FromStr;
use uuid::Uuid;
-use error_chain::ChainedError;
use std::thread;
//use std::io::{Stdout,StdoutLock};
use crossbeam_channel as channel;
@@ -63,22 +62,19 @@ macro_rules! generic_loop_work {
db_conn,
row.rev_id.expect("valid, non-deleted row"),
HideFlags::none(),
- )
- .chain_err(|| "reading entity from database")?;
- //let mut entity = ReleaseEntity::db_get_rev(db_conn, row.rev_id.expect("valid, non-deleted row"))?;
+ )?; // .chain_err(|| "reading entity from database")?;
entity.state = Some("active".to_string()); // XXX
entity.ident = Some(row.ident_id.to_string());
if let Some(expand) = expand {
- entity
- .db_expand(db_conn, expand)
- .chain_err(|| "expanding sub-entities from database")?;
+ entity.db_expand(db_conn, expand)?
+ // chain_err(|| "expanding sub-entities from database")?;
}
output_sender.send(serde_json::to_string(&entity)?);
}
Ok(())
})();
if let Err(ref e) = result {
- error!("{}", e.display_chain())
+ error!("{}", e); // e.display_chain())
}
result.unwrap()
}