sysconst.pp 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. SinvalidCurrency = 'Invalid currency: "%s"';
  52. SInvalidDateTime = '%f is not a valid date/time value.';
  53. SInvalidDrive = 'Invalid drive specified';
  54. SInvalidFileHandle = 'Invalid file handle';
  55. SInvalidFloat = '"%s" is an invalid float';
  56. SInvalidFormat = 'Invalid format specifier : "%s"';
  57. SInvalidGUID = '"%s" is not a valid GUID value';
  58. SInvalidInput = 'Invalid input';
  59. SInvalidInteger = '"%s" is an invalid integer';
  60. SInvalidOp = 'Invalid floating point operation';
  61. SInvalidPointer = 'Invalid pointer operation';
  62. SInvalidVarCast = 'Invalid variant type case';
  63. SInvalidVarNullOp = 'Invalid NULL variant operation';
  64. SInvalidVarOp = 'Invalid variant operation';
  65. SInvalidVarOpWithHResultWithPrefix = 'Invalid variant operation (%s%.8x)'+LineEnding+'%s';
  66. SNoError = 'No error.';
  67. SNoThreadSupport = 'Threads not supported. Recompile program with thread driver.';
  68. SOSError = 'System error, (OS Code %d):'+LineEnding+'%s';
  69. SOutOfMemory = 'Out of memory';
  70. SOverflow = 'Floating point overflow';
  71. SPrivilege = 'Privileged instruction';
  72. SRangeError = 'Range check error';
  73. SSafecallException = 'Exception in safecall method';
  74. STooManyOpenFiles = 'Too many open files';
  75. SUnKnownRunTimeError = 'Unknown Run-Time error : %3.3d';
  76. SUnderflow = 'Floating point underflow';
  77. SUnkOSError = 'An operating system call failed.';
  78. SUnknown = 'Unknown run-time error code: ';
  79. SUnknownErrorCode = 'Unknown error code: %d';
  80. SVarArrayBounds = 'Variant array bounds error';
  81. SVarArrayCreate = 'Variant array cannot be created';
  82. SVarArrayLocked = 'Variant array locked';
  83. SVarBadType = 'Invalid variant type';
  84. SVarInvalid = 'Invalid argument';
  85. SVarNotArray = 'Variant doesn''t contain an array';
  86. SVarNotImplemented = 'Operation not supported';
  87. SVarOutOfMemory = 'Variant operation ran out memory';
  88. SVarOverflow = 'Variant overflow';
  89. SVarParamNotFound = 'Variant Parameter not found';
  90. SVarTypeAlreadyUsedWithPrefix = 'Custom variant type (%s%.4x) already used by %s';
  91. SVarTypeConvertOverflow = 'Overflow while converting variant of type (%s) into type (%s)';
  92. SVarTypeCouldNotConvert = 'Could not convert variant of type (%s) into type (%s)';
  93. SVarTypeNotUsableWithPrefix = 'Custom variant type (%s%.4x) is not usable';
  94. SVarTypeOutOfRangeWithPrefix = 'Custom variant type (%s%.4x) is out of range';
  95. SVarTypeRangeCheck1 = 'Range check error for variant of type (%s)';
  96. SVarTypeRangeCheck2 = 'Range check error while converting variant of type (%s) into type (%s)';
  97. SVarTypeTooManyCustom = 'Too many custom variant types have been registered';
  98. SVarUnexpected = 'Unexpected variant error';
  99. SNoToolserver = 'Toolserver is not installed, cannot execute Tool';
  100. SShortMonthNameJan = 'Jan';
  101. SShortMonthNameFeb = 'Feb';
  102. SShortMonthNameMar = 'Mar';
  103. SShortMonthNameApr = 'Apr';
  104. SShortMonthNameMay = 'May';
  105. SShortMonthNameJun = 'Jun';
  106. SShortMonthNameJul = 'Jul';
  107. SShortMonthNameAug = 'Aug';
  108. SShortMonthNameSep = 'Sep';
  109. SShortMonthNameOct = 'Oct';
  110. SShortMonthNameNov = 'Nov';
  111. SShortMonthNameDec = 'Dec';
  112. SLongMonthNameJan = 'January';
  113. SLongMonthNameFeb = 'February';
  114. SLongMonthNameMar = 'March';
  115. SLongMonthNameApr = 'April';
  116. SLongMonthNameMay = 'May';
  117. SLongMonthNameJun = 'June';
  118. SLongMonthNameJul = 'July';
  119. SLongMonthNameAug = 'August';
  120. SLongMonthNameSep = 'September';
  121. SLongMonthNameOct = 'October';
  122. SLongMonthNameNov = 'November';
  123. SLongMonthNameDec = 'December';
  124. SShortDayNameMon = 'Mon';
  125. SShortDayNameTue = 'Tue';
  126. SShortDayNameWed = 'Wed';
  127. SShortDayNameThu = 'Thu';
  128. SShortDayNameFri = 'Fri';
  129. SShortDayNameSat = 'Sat';
  130. SShortDayNameSun = 'Sun';
  131. SLongDayNameMon = 'Monday';
  132. SLongDayNameTue = 'Tuesday';
  133. SLongDayNameWed = 'Wednesday';
  134. SLongDayNameThu = 'Thursday';
  135. SLongDayNameFri = 'Friday';
  136. SLongDayNameSat = 'Saturday';
  137. SLongDayNameSun = 'Sunday';
  138. Function GetRunError(Errno : Byte) : String;
  139. Implementation
  140. Function GetRunError(Errno : Byte) : String;
  141. begin
  142. Case Errno Of
  143. 0 : Result:=SNoError;
  144. 1 : Result:=SOutOfMemory;
  145. 2 : Result:=SFileNotFound;
  146. 3 : Result:=SInvalidFileName;
  147. 4 : Result:=STooManyOpenFiles;
  148. 5 : Result:=SAccessDenied;
  149. 6 : Result:=SInvalidFileHandle;
  150. 15 : Result:=SInvalidDrive;
  151. 100 : Result:=SEndOfFile;
  152. 101 : Result:=SDiskFull;
  153. 102 : Result:=SFileNotAssigned;
  154. 103 : Result:=SFileNotOpen;
  155. 104 : Result:=SFileNotOpenForInput;
  156. 105 : Result:=SFileNotOpenForOutput;
  157. 106 : Result:=SInvalidInput;
  158. 200 : Result:=SDivByZero;
  159. 201 : Result:=SRangeError;
  160. 203 : Result:=SOutOfMemory;
  161. 204 : Result:=SInvalidPointer;
  162. 205 : Result:=SOverFlow;
  163. 206 : Result:=SUnderFlow;
  164. 207 : Result:=SInvalidOp;
  165. 211 : Result:=SAbstractError;
  166. 215 : Result:=SIntOverFlow;
  167. 216 : Result:=SAccessViolation;
  168. 217 : Result:=SPrivilege;
  169. 218 : Result:=SControlC;
  170. 219 : Result:=SInvalidCast;
  171. 220 : Result:=SInvalidVarCast;
  172. 221 : Result:=SInvalidVarOp;
  173. 222 : Result:=SDispatchError;
  174. 223 : Result:=SVarArrayCreate;
  175. 224 : Result:=SVarNotArray;
  176. 225 : Result:=SVarArrayBounds;
  177. 227 : Result:=SAssertionFailed;
  178. 228 : Result:=SExternalException;
  179. 229 : Result:=SIntfCastError;
  180. 230 : Result:=SSafecallException;
  181. 231 : Result:=SExceptionStack;
  182. 232 : Result:=SNoThreadSupport;
  183. {Error in the range 900 - 999 is considered platform specific}
  184. // 900 : Result:=SNoToolserver; {Mac OS specific}
  185. end;
  186. If length(Result)=0 then
  187. {$ifdef VER1_0}
  188. begin
  189. Str(Errno:3,Result);
  190. Result:=SUnknown+Result;
  191. end;
  192. {$else}
  193. Result:=SUnknown+Str(Errno:3);
  194. {$endif}
  195. end;
  196. end.
  197. {
  198. $Log$
  199. Revision 1.12 2004-08-25 15:29:58 peter
  200. * disbaled error 900 that is out of range
  201. Revision 1.11 2004/08/20 10:18:58 olle
  202. + added error 900, for macos
  203. Revision 1.10 2004/06/12 13:23:17 michael
  204. + Fixed currency<->string conversion support
  205. Revision 1.9 2004/02/08 11:44:05 michael
  206. + OSERRor related constants
  207. Revision 1.8 2004/01/20 23:05:31 hajny
  208. * ExecuteProcess fixes, ProcessID and ThreadID added
  209. Revision 1.7 2004/01/10 19:35:17 michael
  210. + Moved all resource strings to rtlconst/sysconst
  211. Revision 1.6 2004/01/10 17:55:45 michael
  212. + Changed lookup table with Case: Array of resourcestring is not translated
  213. Revision 1.5 2003/11/30 15:04:56 michael
  214. + Removed old strings
  215. Revision 1.4 2003/11/27 20:39:43 michael
  216. + Added runerrors functionality to sysconst
  217. Revision 1.3 2003/11/26 20:34:19 michael
  218. + Some fixes to have everything compile again
  219. Revision 1.2 2003/11/26 20:00:19 florian
  220. * error handling for Variants improved
  221. Revision 1.1 2003/09/03 14:09:37 florian
  222. * arm fixes to the common rtl code
  223. * some generic math code fixed
  224. * ...
  225. }