sysconst.pp 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2003 by Florian Klaempfl
  5. member of the Free Pascal development team
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {$mode objfpc}
  13. {$H+}
  14. unit sysconst;
  15. interface
  16. resourcestring
  17. { from old str*.inc files }
  18. SAbortError = 'Operation aborted';
  19. SAbstractError = 'Abstract method called';
  20. SAccessDenied = 'Access denied';
  21. SAccessViolation = 'Access violation';
  22. SArgumentMissing = 'Missing argument in format "%s"';
  23. SAssertError = '%s (%s, line %d)';
  24. SAssertionFailed = 'Assertion failed';
  25. SControlC = 'Control-C hit';
  26. SDiskFull = 'Disk Full';
  27. SDispatchError = 'No variant method call dispatch';
  28. SDivByZero = 'Division by zero';
  29. SEndOfFile = 'Read past end of file';
  30. SErrInvalidDateMonthWeek = 'Year %d, month %d, Week %d and day %d is not a valid date.';
  31. SErrInvalidDateWeek = '%d %d %d is not a valid dateweek';
  32. SErrInvalidDayOfWeek = '%d is not a valid day of the week';
  33. SErrInvalidDayOfWeekInMonth = 'Year %d Month %d NDow %d DOW %d is not a valid date';
  34. SErrInvalidDayOfYear = 'Year %d does not have a day number %d';
  35. SErrInvalidTimeStamp = 'Invalid date/timestamp : "%s"';
  36. SExceptionErrorMessage = 'exception at %p';
  37. SExceptionStack = 'Exception stack error';
  38. SExecuteProcessFailed = 'Failed to execute %s : %d';
  39. SExternalException = 'External exception %x';
  40. SFileNotAssigned = 'File not assigned';
  41. SFileNotFound = 'File not found';
  42. SFileNotOpen = 'File not open';
  43. SFileNotOpenForInput = 'File not open for input';
  44. SFileNotOpenForOutput = 'File not open for output';
  45. SInValidFileName = 'Invalid filename';
  46. SIntOverflow = 'Arithmetic overflow';
  47. SIntfCastError = 'Interface not supported';
  48. SInvalidArgIndex = 'Invalid argument index in format "%s"';
  49. SInvalidBoolean = '"%s" is not a valid boolean.';
  50. SInvalidCast = 'Invalid type cast';
  51. SInvalidDateTime = '%f is not a valid date/time value.';
  52. SInvalidDrive = 'Invalid drive specified';
  53. SInvalidFileHandle = 'Invalid file handle';
  54. SInvalidFloat = '"%s" is an invalid float';
  55. SInvalidFormat = 'Invalid format specifier : "%s"';
  56. SInvalidGUID = '"%s" is not a valid GUID value';
  57. SInvalidInput = 'Invalid input';
  58. SInvalidInteger = '"%s" is an invalid integer';
  59. SInvalidOp = 'Invalid floating point operation';
  60. SInvalidPointer = 'Invalid pointer operation';
  61. SInvalidVarCast = 'Invalid variant type case';
  62. SInvalidVarNullOp = 'Invalid NULL variant operation';
  63. SInvalidVarOp = 'Invalid variant operation';
  64. SInvalidVarOpWithHResultWithPrefix = 'Invalid variant operation (%s%.8x)'+LineEnding+'%s';
  65. SNoError = 'No error.';
  66. SNoThreadSupport = 'Threads not supported. Recompile program with thread driver.';
  67. SOutOfMemory = 'Out of memory';
  68. SOverflow = 'Floating point overflow';
  69. SPrivilege = 'Privileged instruction';
  70. SRangeError = 'Range check error';
  71. SSafecallException = 'Exception in safecall method';
  72. STooManyOpenFiles = 'Too many open files';
  73. SUnKnownRunTimeError = 'Unknown Run-Time error : %3.3d';
  74. SUnderflow = 'Floating point underflow';
  75. SUnknown = 'Unknown run-time error code: ';
  76. SUnknownErrorCode = 'Unknown error code: %d';
  77. SVarArrayBounds = 'Variant array bounds error';
  78. SVarArrayCreate = 'Variant array cannot be created';
  79. SVarArrayLocked = 'Variant array locked';
  80. SVarBadType = 'Invalid variant type';
  81. SVarInvalid = 'Invalid argument';
  82. SVarNotArray = 'Variant doesn''t contain an array';
  83. SVarNotImplemented = 'Operation not supported';
  84. SVarOutOfMemory = 'Variant operation ran out memory';
  85. SVarOverflow = 'Variant overflow';
  86. SVarParamNotFound = 'Variant Parameter not found';
  87. SVarTypeAlreadyUsedWithPrefix = 'Custom variant type (%s%.4x) already used by %s';
  88. SVarTypeConvertOverflow = 'Overflow while converting variant of type (%s) into type (%s)';
  89. SVarTypeCouldNotConvert = 'Could not convert variant of type (%s) into type (%s)';
  90. SVarTypeNotUsableWithPrefix = 'Custom variant type (%s%.4x) is not usable';
  91. SVarTypeOutOfRangeWithPrefix = 'Custom variant type (%s%.4x) is out of range';
  92. SVarTypeRangeCheck1 = 'Range check error for variant of type (%s)';
  93. SVarTypeRangeCheck2 = 'Range check error while converting variant of type (%s) into type (%s)';
  94. SVarTypeTooManyCustom = 'Too many custom variant types have been registered';
  95. SVarUnexpected = 'Unexpected variant error';
  96. SShortMonthNameJan = 'Jan';
  97. SShortMonthNameFeb = 'Feb';
  98. SShortMonthNameMar = 'Mar';
  99. SShortMonthNameApr = 'Apr';
  100. SShortMonthNameMay = 'May';
  101. SShortMonthNameJun = 'Jun';
  102. SShortMonthNameJul = 'Jul';
  103. SShortMonthNameAug = 'Aug';
  104. SShortMonthNameSep = 'Sep';
  105. SShortMonthNameOct = 'Oct';
  106. SShortMonthNameNov = 'Nov';
  107. SShortMonthNameDec = 'Dec';
  108. SLongMonthNameJan = 'January';
  109. SLongMonthNameFeb = 'February';
  110. SLongMonthNameMar = 'March';
  111. SLongMonthNameApr = 'April';
  112. SLongMonthNameMay = 'May';
  113. SLongMonthNameJun = 'June';
  114. SLongMonthNameJul = 'July';
  115. SLongMonthNameAug = 'August';
  116. SLongMonthNameSep = 'September';
  117. SLongMonthNameOct = 'October';
  118. SLongMonthNameNov = 'November';
  119. SLongMonthNameDec = 'December';
  120. SShortDayNameMon = 'Mon';
  121. SShortDayNameTue = 'Tue';
  122. SShortDayNameWed = 'Wed';
  123. SShortDayNameThu = 'Thu';
  124. SShortDayNameFri = 'Fri';
  125. SShortDayNameSat = 'Sat';
  126. SShortDayNameSun = 'Sun';
  127. SLongDayNameMon = 'Monday';
  128. SLongDayNameTue = 'Tuesday';
  129. SLongDayNameWed = 'Wednesday';
  130. SLongDayNameThu = 'Thursday';
  131. SLongDayNameFri = 'Friday';
  132. SLongDayNameSat = 'Saturday';
  133. SLongDayNameSun = 'Sunday';
  134. Function GetRunError(Errno : Byte) : String;
  135. Implementation
  136. Function GetRunError(Errno : Byte) : String;
  137. begin
  138. Case Errno Of
  139. 0 : Result:=SNoError;
  140. 1 : Result:=SOutOfMemory;
  141. 2 : Result:=SFileNotFound;
  142. 3 : Result:=SInvalidFileName;
  143. 4 : Result:=STooManyOpenFiles;
  144. 5 : Result:=SAccessDenied;
  145. 6 : Result:=SInvalidFileHandle;
  146. 15 : Result:=SInvalidDrive;
  147. 100 : Result:=SEndOfFile;
  148. 101 : Result:=SDiskFull;
  149. 102 : Result:=SFileNotAssigned;
  150. 103 : Result:=SFileNotOpen;
  151. 104 : Result:=SFileNotOpenForInput;
  152. 105 : Result:=SFileNotOpenForOutput;
  153. 106 : Result:=SInvalidInput;
  154. 200 : Result:=SDivByZero;
  155. 201 : Result:=SRangeError;
  156. 203 : Result:=SOutOfMemory;
  157. 204 : Result:=SInvalidPointer;
  158. 205 : Result:=SOverFlow;
  159. 206 : Result:=SUnderFlow;
  160. 207 : Result:=SInvalidOp;
  161. 211 : Result:=SAbstractError;
  162. 215 : Result:=SIntOverFlow;
  163. 216 : Result:=SAccessViolation;
  164. 217 : Result:=SPrivilege;
  165. 218 : Result:=SControlC;
  166. 219 : Result:=SInvalidCast;
  167. 220 : Result:=SInvalidVarCast;
  168. 221 : Result:=SInvalidVarOp;
  169. 222 : Result:=SDispatchError;
  170. 223 : Result:=SVarArrayCreate;
  171. 224 : Result:=SVarNotArray;
  172. 225 : Result:=SVarArrayBounds;
  173. 227 : Result:=SAssertionFailed;
  174. 228 : Result:=SExternalException;
  175. 229 : Result:=SIntfCastError;
  176. 230 : Result:=SSafecallException;
  177. 231 : Result:=SExceptionStack;
  178. 232 : Result:=SNoThreadSupport;
  179. end;
  180. If length(Result)=0 then
  181. {$ifdef VER1_0}
  182. begin
  183. Str(Errno:3,Result);
  184. Result:=SUnknown+Result;
  185. end;
  186. {$else}
  187. Result:=SUnknown+Str(Errno:3);
  188. {$endif}
  189. end;
  190. end.
  191. {
  192. $Log$
  193. Revision 1.8 2004-01-20 23:05:31 hajny
  194. * ExecuteProcess fixes, ProcessID and ThreadID added
  195. Revision 1.7 2004/01/10 19:35:17 michael
  196. + Moved all resource strings to rtlconst/sysconst
  197. Revision 1.6 2004/01/10 17:55:45 michael
  198. + Changed lookup table with Case: Array of resourcestring is not translated
  199. Revision 1.5 2003/11/30 15:04:56 michael
  200. + Removed old strings
  201. Revision 1.4 2003/11/27 20:39:43 michael
  202. + Added runerrors functionality to sysconst
  203. Revision 1.3 2003/11/26 20:34:19 michael
  204. + Some fixes to have everything compile again
  205. Revision 1.2 2003/11/26 20:00:19 florian
  206. * error handling for Variants improved
  207. Revision 1.1 2003/09/03 14:09:37 florian
  208. * arm fixes to the common rtl code
  209. * some generic math code fixed
  210. * ...
  211. }