diff options
Diffstat (limited to 'src/db/payments.rs')
-rw-r--r-- | src/db/payments.rs | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/db/payments.rs b/src/db/payments.rs index bebc69d..25b10f4 100644 --- a/src/db/payments.rs +++ b/src/db/payments.rs @@ -82,7 +82,7 @@ WHERE match res { Ok(count) => count, Err(err) => { - error!("Error counting payments: {:?}", err); + log::error!("Error counting payments: {:?}", err); Count { count: 0, total_cost: 0, @@ -169,7 +169,7 @@ OFFSET ? match res { Ok(payments) => payments, Err(err) => { - error!("Error listing payments: {:?}", err); + log::error!("Error listing payments: {:?}", err); vec![] } } @@ -308,7 +308,7 @@ GROUP BY match result { Ok(payments) => payments, Err(err) => { - error!("Error listing payments for statistics: {:?}", err); + log::error!("Error listing payments for statistics: {:?}", err); vec![] } } @@ -342,7 +342,7 @@ WHERE match res { Ok(count) => count, Err(err) => { - error!("Error getting payment row: {:?}", err); + log::error!("Error getting payment row: {:?}", err); 1 } } @@ -373,7 +373,7 @@ WHERE match res { Ok(p) => Some(p), Err(err) => { - error!("Error looking for payment {}: {:?}", id, err); + log::error!("Error looking for payment {}: {:?}", id, err); None } } @@ -400,7 +400,7 @@ VALUES match res { Ok(x) => Some(x.last_insert_rowid()), Err(err) => { - error!("Error creating payment: {:?}", err); + log::error!("Error creating payment: {:?}", err); None } } @@ -434,7 +434,7 @@ WHERE match res { Ok(_) => true, Err(err) => { - error!("Error updating payment {}: {:?}", id, err); + log::error!("Error updating payment {}: {:?}", id, err); false } } @@ -458,7 +458,7 @@ WHERE match res { Ok(_) => true, Err(err) => { - error!("Error deleting payment {}: {:?}", id, err); + log::error!("Error deleting payment {}: {:?}", id, err); false } } @@ -493,9 +493,10 @@ ORDER BY Ok(category) => Some(category), Err(Error::RowNotFound) => None, Err(err) => { - error!( + log::error!( "Error looking for the category of {}: {:?}", - payment_name, err + payment_name, + err ); None } @@ -521,9 +522,10 @@ LIMIT Ok(_) => true, Err(Error::RowNotFound) => false, Err(err) => { - error!( + log::error!( "Error looking if category {} is used: {:?}", - category_id, err + category_id, + err ); false } @@ -560,7 +562,7 @@ ON match res { Ok(costs) => HashMap::from_iter(costs), Err(err) => { - error!("Error getting payments repartition: {:?}", err); + log::error!("Error getting payments repartition: {:?}", err); HashMap::new() } } @@ -588,7 +590,7 @@ WHERE match res { Ok(_) => (), - Err(err) => error!("Error creating monthly payments: {:?}", err), + Err(err) => log::error!("Error creating monthly payments: {:?}", err), } } @@ -640,7 +642,7 @@ ORDER BY match res { Ok(payments) => payments, Err(err) => { - error!("Error listing payments for report: {:?}", err); + log::error!("Error listing payments for report: {:?}", err); vec![] } } |