sysconst.pp 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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. SShortMonthNameJan = 'Jan';
  100. SShortMonthNameFeb = 'Feb';
  101. SShortMonthNameMar = 'Mar';
  102. SShortMonthNameApr = 'Apr';
  103. SShortMonthNameMay = 'May';
  104. SShortMonthNameJun = 'Jun';
  105. SShortMonthNameJul = 'Jul';
  106. SShortMonthNameAug = 'Aug';
  107. SShortMonthNameSep = 'Sep';
  108. SShortMonthNameOct = 'Oct';
  109. SShortMonthNameNov = 'Nov';
  110. SShortMonthNameDec = 'Dec';
  111. SLongMonthNameJan = 'January';
  112. SLongMonthNameFeb = 'February';
  113. SLongMonthNameMar = 'March';
  114. SLongMonthNameApr = 'April';
  115. SLongMonthNameMay = 'May';
  116. SLongMonthNameJun = 'June';
  117. SLongMonthNameJul = 'July';
  118. SLongMonthNameAug = 'August';
  119. SLongMonthNameSep = 'September';
  120. SLongMonthNameOct = 'October';
  121. SLongMonthNameNov = 'November';
  122. SLongMonthNameDec = 'December';
  123. SShortDayNameMon = 'Mon';
  124. SShortDayNameTue = 'Tue';
  125. SShortDayNameWed = 'Wed';
  126. SShortDayNameThu = 'Thu';
  127. SShortDayNameFri = 'Fri';
  128. SShortDayNameSat = 'Sat';
  129. SShortDayNameSun = 'Sun';
  130. SLongDayNameMon = 'Monday';
  131. SLongDayNameTue = 'Tuesday';
  132. SLongDayNameWed = 'Wednesday';
  133. SLongDayNameThu = 'Thursday';
  134. SLongDayNameFri = 'Friday';
  135. SLongDayNameSat = 'Saturday';
  136. SLongDayNameSun = 'Sunday';
  137. Function GetRunError(Errno : Byte) : String;
  138. Implementation
  139. Function GetRunError(Errno : Byte) : String;
  140. begin
  141. Case Errno Of
  142. 0 : Result:=SNoError;
  143. 1 : Result:=SOutOfMemory;
  144. 2 : Result:=SFileNotFound;
  145. 3 : Result:=SInvalidFileName;
  146. 4 : Result:=STooManyOpenFiles;
  147. 5 : Result:=SAccessDenied;
  148. 6 : Result:=SInvalidFileHandle;
  149. 15 : Result:=SInvalidDrive;
  150. 100 : Result:=SEndOfFile;
  151. 101 : Result:=SDiskFull;
  152. 102 : Result:=SFileNotAssigned;
  153. 103 : Result:=SFileNotOpen;
  154. 104 : Result:=SFileNotOpenForInput;
  155. 105 : Result:=SFileNotOpenForOutput;
  156. 106 : Result:=SInvalidInput;
  157. 200 : Result:=SDivByZero;
  158. 201 : Result:=SRangeError;
  159. 203 : Result:=SOutOfMemory;
  160. 204 : Result:=SInvalidPointer;
  161. 205 : Result:=SOverFlow;
  162. 206 : Result:=SUnderFlow;
  163. 207 : Result:=SInvalidOp;
  164. 211 : Result:=SAbstractError;
  165. 215 : Result:=SIntOverFlow;
  166. 216 : Result:=SAccessViolation;
  167. 217 : Result:=SPrivilege;
  168. 218 : Result:=SControlC;
  169. 219 : Result:=SInvalidCast;
  170. 220 : Result:=SInvalidVarCast;
  171. 221 : Result:=SInvalidVarOp;
  172. 222 : Result:=SDispatchError;
  173. 223 : Result:=SVarArrayCreate;
  174. 224 : Result:=SVarNotArray;
  175. 225 : Result:=SVarArrayBounds;
  176. 227 : Result:=SAssertionFailed;
  177. 228 : Result:=SExternalException;
  178. 229 : Result:=SIntfCastError;
  179. 230 : Result:=SSafecallException;
  180. 231 : Result:=SExceptionStack;
  181. 232 : Result:=SNoThreadSupport;
  182. end;
  183. If length(Result)=0 then
  184. {$ifdef VER1_0}
  185. begin
  186. Str(Errno:3,Result);
  187. Result:=SUnknown+Result;
  188. end;
  189. {$else}
  190. Result:=SUnknown+Str(Errno:3);
  191. {$endif}
  192. end;
  193. end.
  194. {
  195. $Log$
  196. Revision 1.10 2004-06-12 13:23:17 michael
  197. + Fixed currency<->string conversion support
  198. Revision 1.9 2004/02/08 11:44:05 michael
  199. + OSERRor related constants
  200. Revision 1.8 2004/01/20 23:05:31 hajny
  201. * ExecuteProcess fixes, ProcessID and ThreadID added
  202. Revision 1.7 2004/01/10 19:35:17 michael
  203. + Moved all resource strings to rtlconst/sysconst
  204. Revision 1.6 2004/01/10 17:55:45 michael
  205. + Changed lookup table with Case: Array of resourcestring is not translated
  206. Revision 1.5 2003/11/30 15:04:56 michael
  207. + Removed old strings
  208. Revision 1.4 2003/11/27 20:39:43 michael
  209. + Added runerrors functionality to sysconst
  210. Revision 1.3 2003/11/26 20:34:19 michael
  211. + Some fixes to have everything compile again
  212. Revision 1.2 2003/11/26 20:00:19 florian
  213. * error handling for Variants improved
  214. Revision 1.1 2003/09/03 14:09:37 florian
  215. * arm fixes to the common rtl code
  216. * some generic math code fixed
  217. * ...
  218. }