Changeset 6a5712c in git


Ignore:
Timestamp:
Nov 26, 2009, 1:45:36 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd25190065115c859833252500a64cfb7b11e3a50')
Children:
28f60ccf21a7ca5ee6bd5aaa6eba3291e8c46a09
Parents:
bd19b6bb49208a846ad48960d27e4262b206efea
Message:
*hannes: error handling

git-svn-id: file:///usr/local/Singular/svn/trunk@12330 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/toric.lib

    rbd19b6 r6a5712c  
    2121  if(nvars(basering)<ncols(A))
    2222  {
    23     "ERROR: The number of matrix columns is smaller than the number of ring variables.";
    24     return(I);
     23    ERROR("The number of matrix columns is smaller than the number of ring variables.");
    2524  }
    2625
     
    205204  if(external_ord=="")
    206205  {
    207     "ERROR: The term ordering of the actual basering is not supported.";
    208     return(I);
     206    ERROR("The term ordering of the actual basering is not supported.");
    209207  }
    210208
     
    215213    // extended matrix
    216214  {
    217     "ERROR: The chosen algorithm is not suitable.";
    218     return(I);
     215    ERROR("The chosen algorithm is not suitable.");
    219216  }
    220217
     
    263260    if(found==0)
    264261    {
    265       "ERROR: The chosen algorithm needs a positive vector in the row space of the matrix.";
    266262      close(MATRIX);
    267263      dummy=system("sh","rm -f "+matrixfile);
    268       return(I);
     264      ERROR("The chosen algorithm needs a positive vector in the row space of the matrix.");
    269265    }
    270266    write(MATRIX,"positive row space vector:");
     
    279275  // call external program
    280276  dummy=system("sh","toric_ideal -alg "+alg+" "+matrixfile);
     277  if (dummy!=0) { ERROR("toric_ideal failed with error code "+string(dummy)); }
    281278
    282279  // read toric ideal from created file
     
    355352  if(size(prsv)<ncols(A))
    356353  {
    357     "ERROR: The number of matrix columns does not equal the size of the positive row space vector.";
    358     return(I);
     354    ERROR("The number of matrix columns does not equal the size of the positive row space vector.");
    359355  }
    360356
     
    362358  if(nvars(basering)!=ncols(A))
    363359  {
    364     "ERROR: The number of matrix columns is smaller than the number of ring variables.";
    365     return(I);
     360    ERROR("The number of matrix columns is smaller than the number of ring variables.");
    366361  }
    367362
     
    546541  if(external_ord=="")
    547542  {
    548     "ERROR: The term ordering of the actual basering is not supported.";
    549     return(I);
     543    ERROR("The term ordering of the actual basering is not supported.");
    550544  }
    551545
     
    556550    // extended matrix
    557551  {
    558     "ERROR: The chosen algorithm is not suitable.";
    559     return(I);
     552    ERROR("The chosen algorithm is not suitable.");
    560553  }
    561554
     
    595588  // call external program
    596589  dummy=system("sh","toric_ideal -alg "+alg+" "+matrixfile);
     590  if (dummy!=0) { ERROR("toric_ideal failed with error code "+string(dummy)); }
    597591
    598592  // read toric ideal from created file
     
    930924  if(external_ord=="")
    931925  {
    932     "ERROR: The term ordering of the actual basering is not supported.";
    933     return(I);
     926    ERROR("The term ordering of the actual basering is not supported.");
    934927  }
    935928
     
    967960    if(head==0 && tail==0 && rest!=0)
    968961    {
    969       "ERROR: Generator "+string(j)+" of the input ideal is no binomial.";
    970962      close(GROEBNER);
    971963      dummy=system("sh","rm -f "+groebnerfile);
    972       return(J);
     964      ERROR("Generator "+string(j)+" of the input ideal is no binomial.");
    973965    }
    974966
     
    976968      // generator is no difference of monomials (or a constant multiple)
    977969    {
    978       "ERROR: Generator "+string(j)+" of the input ideal is no difference of monomials.";
    979970      close(GROEBNER);
    980971      dummy=system("sh","rm -f "+groebnerfile);
    981       return(J);
     972      ERROR("Generator "+string(j)+" of the input ideal is no difference of monomials.");
    982973    }
    983974
     
    10101001  // call external program
    10111002  dummy=system("sh","change_cost "+groebnerfile+" "+newcostfile);
     1003  if (dummy!=0) { ERROR("change_cost failed with error code "+string(dummy)); }
    10121004
    10131005  // read toric standard basis from created file
Note: See TracChangeset for help on using the changeset viewer.