diff scripts/plot/private/__interp_cube__.m @ 10635:d1978e7364ad

Print name of function in error() string messages.
author Rik <octave@nomad.inbox5.com>
date Sun, 16 May 2010 22:26:54 -0700
parents 1aeb39118764
children 2c356a35d7f5
line wrap: on
line diff
--- a/scripts/plot/private/__interp_cube__.m
+++ b/scripts/plot/private/__interp_cube__.m
@@ -31,16 +31,16 @@
     y = y(:);
     z = z(:);
   else
-    error("x, y, z have wrong dimensions");
+    error("__interp_cube__: x, y, z have wrong dimensions");
   endif
   if (size (val) != [length(x), length(y), length(z)])
-    error ("val has wrong dimensions");
+    error ("__interp_cube__: val has wrong dimensions");
   endif
   if (size (v, 2) != 3)
     error ( "v has to be N*3 matrix");
   endif
   if (!ischar (req))
-   error ("Invalid request parameter use 'values', 'normals' or 'normals8'");
+   error ("__interp_cube__: Invalid request parameter use 'values', 'normals' or 'normals8'");
   endif
   if (isempty (v))
     Vxyz = idx = frac = [];
@@ -94,7 +94,7 @@
       [Dx, Dy, Dz, idx, frac] = interp_cube_trilin_grad (x, y, z, val, v);
       Vxyz = [Dx./dx, Dy./dy, Dz./dz];
    otherwise
-     error ("Invalid request type '%s', use 'values', 'normals' or 'normals8'", req);
+     error ("__interp_cube__: Invalid request type '%s', use 'values', 'normals' or 'normals8'", req);
   endswitch
 endfunction
 
@@ -178,4 +178,4 @@
   idx(:, 3) = lookup (z(2:end-1), v(:, 3)) + 1;
   frac(:, 3) = (v(:, 3) - z(idx(:, 3))) ...
       ./ (z(idx(:, 3)+1) - z(idx(:, 3)));
-endfunction
\ No newline at end of file
+endfunction