From 081adc544b32da0b5e27b284c4f108735e641642 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Tue, 31 Oct 2017 17:07:16 +0100
Subject: [PATCH] let caller code handle errors logging

---
 lib/IdPAccountManager/AuthenticationToken.pm |  5 -----
 lib/IdPAccountManager/TestAccount.pm         | 10 ----------
 2 files changed, 15 deletions(-)

diff --git a/lib/IdPAccountManager/AuthenticationToken.pm b/lib/IdPAccountManager/AuthenticationToken.pm
index 59b926b..31b6e00 100644
--- a/lib/IdPAccountManager/AuthenticationToken.pm
+++ b/lib/IdPAccountManager/AuthenticationToken.pm
@@ -10,7 +10,6 @@ use warnings;
 use IdPAccountManager::Data::Authenticationtoken;
 use IdPAccountManager::Data::Authenticationtoken::Manager;
 
-use IdPAccountManager::Tools;
 use Conf;
 
 use Digest::MD5;
@@ -83,8 +82,6 @@ sub save {
     }
 
     unless ($self->{'persistent'}->save()) {
-        IdPAccountManager::Tools::do_log('error',
-            "Failed to save Authenticationtoken in DB");
         return undef;
     }
 }
@@ -94,8 +91,6 @@ sub delete {
     my $self = shift;
 
     unless ($self->{'persistent'}->delete()) {
-        IdPAccountManager::Tools::do_log('error',
-            "Failed to delete a Authenticationtoken in DB");
         return undef;
     }
 }
diff --git a/lib/IdPAccountManager/TestAccount.pm b/lib/IdPAccountManager/TestAccount.pm
index 05a113d..e9a67f2 100644
--- a/lib/IdPAccountManager/TestAccount.pm
+++ b/lib/IdPAccountManager/TestAccount.pm
@@ -70,8 +70,6 @@ sub save {
     }
 
     unless ($self->{'persistent'}->save()) {
-        IdPAccountManager::Tools::do_log('error',
-            "Failed to save Test Account in DB");
         return undef;
     }
 }
@@ -81,8 +79,6 @@ sub delete {
     my $self = shift;
 
     unless ($self->{'persistent'}->delete()) {
-        IdPAccountManager::Tools::do_log('error',
-            "Failed to delete a test account in DB");
         return undef;
     }
 }
@@ -124,8 +120,6 @@ sub create_test_accounts_for_sp {
     my @test_accounts;
 
     unless ($args{'sp_entityid'}) {
-        IdPAccountManager::Tools::do_log('error',
-            "Failed to create test account");
         return undef;
     }
 
@@ -135,14 +129,10 @@ sub create_test_accounts_for_sp {
             sp_entityid     => $args{'sp_entityid'}
         );
         unless (defined $test_account) {
-            IdPAccountManager::Tools::do_log('error',
-                "Failed to create test account");
             return undef;
         }
 
         unless ($test_account->save()) {
-            IdPAccountManager::Tools::do_log('error',
-                "Failed to create test account");
             return undef;
         }
 
-- 
GitLab