I had some luck using the routine below which I stuck into my .perldlrc .

  pdl> traceback 1

switches traceback on and should also reveal the line of code where the slice 
command occurred. The downside is that there may sometimes be too much info.

Christian



sub traceback {
  if (@_ > 0) {
   if ($_[0]) {
    require Carp;
    $SIG{__DIE__} = sub {print Carp::longmess(@_); die;};
   } else { undef $SIG{__DIE__} }
  }
  print 'traceback is '. (($SIG{__DIE__} == undef) ? 'off' : 'on') . "\n";
}

On 23/09/2010, at 5:32 AM, Ingo Schmid wrote:

> 
> 
> 
> Hi,
> 
> when some index overflows, PDL prints a message like this, but no reference 
> to the code line where it happened. That makes debugging a little annoying. 
> Can this be fixed easily, like in almost all other messages?
> 
> 
> Slice cannot start or end above limit at 
> /usr/lib64/perl5/vendor_perl/5.12.1/x86_64-linux-thread-multi/PDL/Core.pm 
> line 477.
> 
> 
> Thanks
> Ingo
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

--
Christian Soeller PhD   Dept. of Physiology  +64 9 3737599 x82770
University of Auckland  Auckland, New Zealand  fax +64 9 3737499


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to