sysconst.pp 8.1 KB

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