diff options
Diffstat (limited to 'macros/GeneralFunctions')
-rw-r--r-- | macros/GeneralFunctions/FunName2SciFileName.sci | 8 | ||||
-rw-r--r-- | macros/GeneralFunctions/ReadStringCard.sci | 2 | ||||
-rw-r--r-- | macros/GeneralFunctions/SCI2CCreateDir.sci | 2 | ||||
-rw-r--r-- | macros/GeneralFunctions/SCI2CNInArgCheck.sci | 4 | ||||
-rw-r--r-- | macros/GeneralFunctions/SCI2COpenFileWrite.sci | 2 | ||||
-rw-r--r-- | macros/GeneralFunctions/filenamefprintf.sci | 2 |
6 files changed, 9 insertions, 11 deletions
diff --git a/macros/GeneralFunctions/FunName2SciFileName.sci b/macros/GeneralFunctions/FunName2SciFileName.sci index 8c473001..39ff5b21 100644 --- a/macros/GeneralFunctions/FunName2SciFileName.sci +++ b/macros/GeneralFunctions/FunName2SciFileName.sci @@ -27,11 +27,11 @@ function ScilabFileName = FunName2SciFileName(DirList,InFunName); SCI2CNInArgCheck(argn(2),2,2);
if (prod(size(DirList)) == 0)
- SCI2Cerror('Incorrect DirList parameter.');
+ error(9999, 'Incorrect DirList parameter.');
end
if (prod(size(InFunName)) == 0)
- SCI2Cerror('Incorrect InFunName parameter.');
+ error(9999, 'Incorrect InFunName parameter.');
end
// --- Generate the PathList. ---
@@ -45,12 +45,12 @@ ScilabFileName = listfiles(PathList); // --- Check on the number of .sci files found. ---
if ((prod(size(ScilabFileName))) > 1)
disp(ScilabFileName);
- SCI2Cerror('Found more than one scilab file.');
+ error(9999, 'Found more than one scilab file.');
end
if ((prod(size(ScilabFileName))) < 1)
disp(ScilabFileName);
- SCI2Cerror('Scilab file ""'+InFunName+'.sci"", not found');
+ error(9999, 'Scilab file ""'+InFunName+'.sci"", not found');
end
endfunction
diff --git a/macros/GeneralFunctions/ReadStringCard.sci b/macros/GeneralFunctions/ReadStringCard.sci index 5d9358ba..a4525d90 100644 --- a/macros/GeneralFunctions/ReadStringCard.sci +++ b/macros/GeneralFunctions/ReadStringCard.sci @@ -52,7 +52,7 @@ clear requested_line dummy2 if (flag_found == 0) then
if (enableerror == 'y') then
- SCI2Cerror([cardname,' not found']);
+ error(9999, cardname+' not found');
else
warning([cardname,' not found']);
end
diff --git a/macros/GeneralFunctions/SCI2CCreateDir.sci b/macros/GeneralFunctions/SCI2CCreateDir.sci index cc152462..dcc39c3e 100644 --- a/macros/GeneralFunctions/SCI2CCreateDir.sci +++ b/macros/GeneralFunctions/SCI2CCreateDir.sci @@ -25,7 +25,7 @@ SCI2CNInArgCheck(argn(2),1,1); status_dir = mkdir(tmppath,tmpfname+tmpextension) ;
if (status_dir == 0)
- SCI2Cerror('Cannot create: '+OutDir);
+ error(9999, 'Cannot create: '+OutDir);
end
endfunction
diff --git a/macros/GeneralFunctions/SCI2CNInArgCheck.sci b/macros/GeneralFunctions/SCI2CNInArgCheck.sci index 23886fed..71b93328 100644 --- a/macros/GeneralFunctions/SCI2CNInArgCheck.sci +++ b/macros/GeneralFunctions/SCI2CNInArgCheck.sci @@ -21,8 +21,6 @@ function SCI2CNInArgCheck(NInArgs,MinNArgs,MaxNArgs) // -----------------------------------------------------------------
if ((NInArgs < MinNArgs) | (NInArgs > MaxNArgs))
- SCI2Cerror('Incorrect number of input arguments.');
+ error(9999, 'Incorrect number of input arguments.');
end
-
-
endfunction
diff --git a/macros/GeneralFunctions/SCI2COpenFileWrite.sci b/macros/GeneralFunctions/SCI2COpenFileWrite.sci index 8a816b92..f87aef87 100644 --- a/macros/GeneralFunctions/SCI2COpenFileWrite.sci +++ b/macros/GeneralFunctions/SCI2COpenFileWrite.sci @@ -24,7 +24,7 @@ SCI2CNInArgCheck(argn(2),1,1); // --- Open the .sci file (write mode). ---
[fidnumber,fiderror] = mopen(filename,'w');
if (fiderror < 0)
- SCI2Cerror(['Cannot open (in write mode): '+filename]);
+ error(9999, 'Cannot open (in write mode): '+filename);
end
endfunction
diff --git a/macros/GeneralFunctions/filenamefprintf.sci b/macros/GeneralFunctions/filenamefprintf.sci index 0b64bd88..99ddcea4 100644 --- a/macros/GeneralFunctions/filenamefprintf.sci +++ b/macros/GeneralFunctions/filenamefprintf.sci @@ -33,7 +33,7 @@ SCI2CNInArgCheck(argn(2),4,4); // [FidReportFile, mess] = mopen(deblank(filename),'at+');
[FidReportFile, mess] = mopen(filename,'a+');
if (FidReportFile == -1) then
- SCI2Cerror(mess);
+ error(9999, mess);
end
if formattedstring == 'n'
mputstr(str,FidReportFile);
|