Add handler to produce a proper backtrace on error
[videosite.git] / videosite-dl.pl
index 769ab43..594b020 100755 (executable)
@@ -6,6 +6,9 @@ use File::Spec;
 use File::Basename;
 use Module::Load;
 use Cwd qw(realpath);
+use Carp;
+
+$SIG{ __DIE__ } = sub { Carp::confess( @_ ) };
 
 my $info = 0;
 my $debug = 0;
@@ -58,5 +61,6 @@ foreach (@ARGV) {
     libvideosite::check_for_link({
         message => $_,
         ewpf => sub { print @_, "\n" },
+        window => "",
     });
 }