Browse Source

some more info on transmission error

themage
theMage 5 years ago
parent
commit
94afb22d10
1 changed files with 6 additions and 2 deletions
  1. 6 2
      lib/CinePantufas/Client/Transmission.pm

+ 6 - 2
lib/CinePantufas/Client/Transmission.pm

@ -68,7 +68,10 @@ sub add_torrent {
68 68
                    ||'',
69 69
      };
70 70
    }
71
  } 
71
  } else {
72
    my $more = $ENV{DEBUG} ? $resp->{content} : '';
73
    die "error on transmission: $resp->{status} $resp->{reason}\n$more\n";
74
  }
72 75
73 76
  return 0;
74 77
}
@ -119,7 +122,8 @@ sub list_torrents {
119 122
120 123
    return \@torrents;
121 124
  } else {
122
    die "error on transmission: $resp->{status} $resp->{reason}\n";
125
    my $more = $ENV{DEBUG} ? $resp->{content} : '';
126
    die "error on transmission: $resp->{status} $resp->{reason}\n$more\n";
123 127
  }
124 128
}
125 129