+ added maxExitCode to all System.pp

* constrained error code to be below maxExitCode in RunError et. al.
This commit is contained in:
olle 2004-09-03 19:25:21 +00:00
parent 5f567e75f8
commit 9a4855aa43
14 changed files with 111 additions and 24 deletions

View File

@ -43,6 +43,7 @@ const
DriveSeparator = ':';
PathSeparator = ';';
FileNameCaseSensitive = false;
maxExitCode = 255;
sLineBreak: string [1] = LineEnding;
{ used for single computations }
@ -765,7 +766,11 @@ end.
{
$Log$
Revision 1.10 2004-01-20 23:05:31 hajny
Revision 1.11 2004-09-03 19:25:21 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.10 2004/01/20 23:05:31 hajny
* ExecuteProcess fixes, ProcessID and ThreadID added
Revision 1.9 2003/10/25 23:42:35 hajny

View File

@ -41,6 +41,7 @@ const
DriveSeparator = ':';
PathSeparator = ':';
{ FileNameCaseSensitive is defined separately below!!! }
maxExitCode = 255;
const
FileNameCaseSensitive : boolean = true;
@ -549,7 +550,11 @@ begin
end.
{
$Log$
Revision 1.14 2004-06-21 18:50:51 olle
Revision 1.15 2004-09-03 19:25:32 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.14 2004/06/21 18:50:51 olle
+ cleanup
Revision 1.13 2004/06/17 16:16:13 peter

View File

@ -42,6 +42,7 @@ const
DriveSeparator = ':';
PathSeparator = ';';
{ FileNameCaseSensitive is defined separately below!!! }
maxExitCode = 255;
type Tos=(osDOS,osOS2,osDPMI);
@ -1332,7 +1333,11 @@ begin
end.
{
$Log$
Revision 1.26 2004-07-24 01:15:25 hajny
Revision 1.27 2004-09-03 19:25:41 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.26 2004/07/24 01:15:25 hajny
* simulated support for new heap manager
Revision 1.25 2004/05/16 20:39:59 hajny

View File

@ -48,6 +48,7 @@ const
DriveSeparator = ':';
PathSeparator = ';';
{ FileNameCaseSensitive is defined separately below!!! }
maxExitCode = 255;
const
@ -1622,7 +1623,11 @@ Begin
End.
{
$Log$
Revision 1.37 2004-06-20 09:24:40 peter
Revision 1.38 2004-09-03 19:25:49 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.37 2004/06/20 09:24:40 peter
fixed go32v2 compile
Revision 1.36 2004/06/17 16:16:13 peter

View File

@ -709,10 +709,12 @@ begin
If pointer(ErrorProc)<>Nil then
ErrorProc(Errno,addr,frame);
errorcode:=word(Errno);
exitcode:=word(Errno);
erroraddr:=addr;
errorbase:=frame;
halt(errorcode);
if errorcode <= maxExitCode then
halt(errorcode)
else
halt(255)
end;
Procedure HandleErrorFrame (Errno : longint;frame : Pointer);
@ -736,13 +738,15 @@ begin
end;
procedure runerror(w : word);[alias: 'FPC_RUNERROR'];
procedure RunError(w : word);[alias: 'FPC_RUNERROR'];
begin
errorcode:=w;
exitcode:=w;
erroraddr:=get_caller_addr(get_frame);
errorbase:=get_caller_frame(get_frame);
halt(errorcode);
if errorcode <= maxExitCode then
halt(errorcode)
else
halt(255)
end;
@ -883,7 +887,11 @@ end;
{
$Log$
Revision 1.63 2004-08-31 12:23:53 jonas
Revision 1.64 2004-09-03 19:26:01 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.63 2004/08/31 12:23:53 jonas
* fixed compilation with 1.0.x
Revision 1.62 2004/08/30 17:36:18 jonas

View File

@ -35,6 +35,8 @@ const
DriveSeparator = ':';
PathSeparator = ','; {Is used in MPW and OzTeX}
FileNameCaseSensitive = false;
maxExitCode = 65535;
{ include heap support headers }
{$I heaph.inc}
@ -49,6 +51,8 @@ const
sLineBreak = LineEnding;
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCR;
var
argc : longint;
argv : ppchar;
@ -1296,7 +1300,11 @@ end.
{
$Log$
Revision 1.19 2004-08-20 10:18:15 olle
Revision 1.20 2004-09-03 19:26:08 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.19 2004/08/20 10:18:15 olle
+ added Yield routine
Revision 1.18 2004/07/14 23:34:07 olle

View File

@ -39,6 +39,7 @@ const
DirectorySeparator = '/';
DriveSeparator = ':';
PathSeparator = ';';
maxExitCode = 255;
const
UnusedHandle : LongInt = -1;
@ -917,7 +918,11 @@ end.
{
$Log$
Revision 1.18 2004-08-09 00:12:40 karoly
Revision 1.19 2004-09-03 19:26:15 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.18 2004/08/09 00:12:40 karoly
* changes to work with updated doslib includes
Revision 1.17 2004/08/03 15:59:41 karoly

View File

@ -43,7 +43,7 @@ const
DriveSeparator = ':';
PathSeparator = ';';
{ FileNameCaseSensitive is defined separately below!!! }
maxExitCode = 255;
{ include heap support headers }
{$I heaph.inc}
@ -889,7 +889,11 @@ Begin
End.
{
$Log$
Revision 1.24 2004-08-01 20:02:48 armin
Revision 1.25 2004-09-03 19:26:27 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.24 2004/08/01 20:02:48 armin
* changed dir separator from \ to /
* long namespace by default
* dos.exec implemented

View File

@ -104,6 +104,8 @@ resourcestring
SVarTypeTooManyCustom = 'Too many custom variant types have been registered';
SVarUnexpected = 'Unexpected variant error';
SFallbackError = 'An error, whose error code is larger than can be returned to the OS, has occured';
SNoToolserver = 'Toolserver is not installed, cannot execute Tool';
SShortMonthNameJan = 'Jan';
@ -148,11 +150,11 @@ resourcestring
SLongDayNameSat = 'Saturday';
SLongDayNameSun = 'Sunday';
Function GetRunError(Errno : Byte) : String;
Function GetRunError(Errno : Word) : String;
Implementation
Function GetRunError(Errno : Byte) : String;
Function GetRunError(Errno : Word) : String;
begin
Case Errno Of
@ -197,8 +199,17 @@ begin
231 : Result:=SExceptionStack;
232 : Result:=SNoThreadSupport;
255 : Result:=SFallbackError;
{Error codes larger than 255 cannot be returned as an exit code to the OS,
for some OS's. If this happens, error 255 is returned instead.
Errors for which it is important that they can be distinguished,
shall be below 255}
{Error in the range 900 - 999 is considered platform specific}
// 900 : Result:=SNoToolserver; {Mac OS specific}
900 : Result:=SNoToolserver; {Mac OS specific}
end;
If length(Result)=0 then
{$ifdef VER1_0}
@ -214,7 +225,11 @@ end;
end.
{
$Log$
Revision 1.12 2004-08-25 15:29:58 peter
Revision 1.13 2004-09-03 19:26:42 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.12 2004/08/25 15:29:58 peter
* disbaled error 900 that is out of range
Revision 1.11 2004/08/20 10:18:58 olle

View File

@ -30,6 +30,7 @@ const
DriveSeparator = ':';
PathSeparator = ';';
FileNameCaseSensitive = false;
maxExitCode = 255; {$ERROR TODO: CONFIRM THIS}
Type
{ type and constant declartions doesn't hurt }
@ -103,7 +104,11 @@ end.
{
$Log$
Revision 1.4 2002-09-07 16:01:25 peter
Revision 1.5 2004-09-03 19:26:52 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.4 2002/09/07 16:01:25 peter
* old logs removed and tabs fixed
}

View File

@ -42,6 +42,10 @@ const
PathSeparator = ';';
FileNameCaseSensitive = false;
{The highest exit code which can be returned to the operating system.
Should be at least 255.}
maxExitCode = 255;
const
UnusedHandle = -1;
StdInputHandle = 0;
@ -316,7 +320,11 @@ Begin
End.
{
$Log$
Revision 1.11 2004-06-17 16:16:14 peter
Revision 1.12 2004-09-03 19:26:57 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.11 2004/06/17 16:16:14 peter
* New heapmanager that releases memory back to the OS, donated
by Micha Nelissen

View File

@ -39,7 +39,7 @@ const
DriveSeparator = ':';
PathSeparator = ':';
{ FileNameCaseSensitive is defined below! }
maxExitCode = 255;
const
UnusedHandle = -1;
@ -60,7 +60,11 @@ var argc:longint;external name 'operatingsystem_parameter_argc';
{
$Log$
Revision 1.21 2004-07-03 22:52:33 daniel
Revision 1.22 2004-09-03 19:27:10 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.21 2004/07/03 22:52:33 daniel
* No envp,argv,argc declaration for Darwin
Revision 1.20 2004/07/03 21:50:31 daniel

View File

@ -42,6 +42,7 @@ const
DriveSeparator = ':';
PathSeparator = ';';
{ FileNameCaseSensitive is defined separately below!!! }
maxExitCode = 255;
const
{ Default filehandles }
@ -1553,7 +1554,11 @@ End.
{
$Log$
Revision 1.14 2004-06-17 16:16:14 peter
Revision 1.15 2004-09-03 19:27:16 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.14 2004/06/17 16:16:14 peter
* New heapmanager that releases memory back to the OS, donated
by Micha Nelissen

View File

@ -46,6 +46,7 @@ const
DriveSeparator = ':';
PathSeparator = ';';
{ FileNameCaseSensitive is defined separately below!!! }
maxExitCode = 65535;
type
PEXCEPTION_FRAME = ^TEXCEPTION_FRAME;
@ -1621,7 +1622,11 @@ end.
{
$Log$
Revision 1.60 2004-06-27 11:57:18 florian
Revision 1.61 2004-09-03 19:27:25 olle
+ added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
Revision 1.60 2004/06/27 11:57:18 florian
* finally (hopefully) fixed sysalloc trouble
Revision 1.59 2004/06/26 15:05:14 florian