Commit Graph

48 Commits

Author SHA1 Message Date
michael
47be45830c * Fix issue ID #38462
git-svn-id: trunk@48580 -
2021-02-10 11:00:22 +00:00
florian
706e72e1fd * better error message for runtime errors 202 and 210, resolves #38254
git-svn-id: trunk@48438 -
2021-01-27 21:28:55 +00:00
michael
722e8d94cd * Error when seek fails
git-svn-id: trunk@47056 -
2020-10-06 08:09:50 +00:00
ondrej
bbdf1b5d27 SysUtils: SInvalidDateTime <> SInvalidDateTimeFloat
git-svn-id: trunk@46747 -
2020-09-02 09:58:12 +00:00
michael
16ba47be46 * Patch from Ondrej Pokorny to convert unit names to CamelCase (bug ID 33481)
git-svn-id: trunk@38616 -
2018-03-23 22:06:36 +00:00
pierre
250e924ad3 + Add RTE 236 for thread errors:
inc/systemh.inc and java/jsystemh.inc:
    + Add reThreadError (and also reNoDynLibsSupport) to TRuntimeError.
    * Add new values to RuntimeErrorExitCodes after extension of TRuntimeError
  inc/system.inc and java/jsystem.inc:
    * use RTE 236 in fpc_threaderror.
  objpas/sysconst.pp and objpas/sysutils/stre.inc:
    + Add SThreadError string constant.
  objpas/sysutils/sysutilh.inc:
    + Add EThreadError class.
  objpas/sysutils/sysutils.inc
    + Add 236 to EThreadError conversion to exeptmap.

git-svn-id: trunk@38584 -
2018-03-21 10:19:04 +00:00
florian
b41cb26727 + write selected features in ppu of the system unit and load them further on
* ppu version update
* -Sf might be used only during system unit compilation
* loadsystemunit factored out so the system unit can be loaded earlier than other units to get features set

git-svn-id: trunk@37708 -
2017-12-10 16:32:56 +00:00
marco
869d24f7d1 * spelling mistakes fpc repo part, mantis #30233
git-svn-id: trunk@33882 -
2016-06-02 20:01:09 +00:00
michael
a5d38c7ba6 * Added TStringBuilder
git-svn-id: trunk@33695 -
2016-05-16 15:23:40 +00:00
florian
d0f4e7cc99 * respect feature defines
git-svn-id: trunk@30378 -
2015-03-29 19:43:25 +00:00
svenbarth
2d454dc8fa Move DynLibs support to System unit using a manager approach like for Threads, WideStrings, etc.. This is needed so that we can support features like "delayed" and loading of dynamic packages.
Each port that allows the usage of dynamic libraries should call InitSystemDynLibs during initialization of the System unit.
The DynLibs unit has been adjusted to be a forwarder for the functions that now reside in the System unit (for backwards compatiblity just in case). Additionally the unit will register the DynLibsManager if it doesn't reside in the System unit anyway.
Currently only the Windows targets (Win32, Win64 and WinCE) implement the DynLibsManager inside the System unit. For other systems using the LoadLibrary, etc. functions will lead to a run error/exception.
If a port wants to implement its own DynLibsManager then it needs to define DISABLE_NO_DYNLIBS_MANAGER. TLibHandle, NilHandle and optionally TOrdinalEntry (it's set to SizeUInt otherwise) should be defined in sysdlh.inc which needs to be enabled using the define FPC_SYSTEM_HAS_SYSDLH (because there are targets which have FEATURE_DYNLIBS enabled, but don't support them... e.g. powerpc-wii -.-).
The DynLibsManager contains methods for loading a library based on a RawByteString and based on a UnicodeString. BOTH should be implemented, but internally one can forward to the other.
The loading by ordinal *can* be be implemented. If it is set to Nil then the implementation of GetProcAddress(lib,ordinal) will return Nil.

+ new functions SetDynLibsManager and GetDynLibsManager to set and retrieve the current DynLibsManager
* provide interface of DynLibs unit in unit System

git-svn-id: trunk@29613 -
2015-02-03 20:00:00 +00:00
svenbarth
db6385ef33 Added exception EObjectCheck for object reference check (runtime error 210).
rtl/objpas/sysconst.pp:
  + add resourcestring SObjectCheckError
rtl/objpas/sysutilh.inc:
  + add new Exception descendant EObjectCheck
rtl/objpas/sysutils.inc:
  + use EObjectCheck with message SObjectCheckError for runtime error 210

git-svn-id: trunk@23656 -
2013-02-24 22:22:38 +00:00
sergei
3b904943e7 * Moved ExceptObjProc from objpas to system, because it is going to be called from system. Also added ExceptClsProc variable.
* Fixed SExceptionErrorMessage, it was missing format placeholder.

git-svn-id: trunk@19787 -
2011-12-09 14:52:26 +00:00
sergei
0093517227 * sysutils: changed RunErrorToExcept to use table instead of case statement for OS exceptions. This is to be able to extract exception class alone for the upcoming SEH support.
* Some Delphi-compatible changes:
  * For floating point underflow condition, raise EUnderflow, not EOverflow.
  * For unknown codes, raise EInOutError, not Exception.
  * Added entries for EZeroDivide and EStackOverflow (actually raising EZeroDivide on floating-point division by zero requires further changes to System because currently both integer and float division by zero is mapped to the same code 200).

  

git-svn-id: trunk@19707 -
2011-11-29 18:41:13 +00:00
paul
aa666d38ed rtl: check arguments in some TEncoding functions which uses array/string access and raise EEncodingError in case of wrong indexes or string/arrays
git-svn-id: trunk@19387 -
2011-10-06 01:14:51 +00:00
paul
abf9816a09 rtl: add basic implementation of TEncoding class
git-svn-id: trunk@19355 -
2011-10-04 05:06:32 +00:00
michael
c0995c2ffd * Moved string constant to sysconst
git-svn-id: trunk@19315 -
2011-10-01 14:42:54 +00:00
Jonas Maebe
4303eda80c * moved SInvalidJulianDate from rtlconst to sysconst (part of r15032,
necessary because dateutils only depends on sysconst and it contains
    the julian-datetime helper routines)

git-svn-id: trunk@15033 -
2010-03-22 22:28:59 +00:00
michael
e4244e0452 * Forgot to commit
git-svn-id: trunk@13871 -
2009-10-16 15:31:25 +00:00
Jonas Maebe
f6d452c2c0 * remove the RTL's installed signal handlers at the end of the system
unit's initialization code in case we're in a library
  + implemented InquireSignal(), AbandonSignalHandler(), HookSignal() and
    UnhookSignal() in the sysutils unit
  * for Kylix compatibility, these routines support operating on
    SIGINT and SIGQUIT as well, although they are not hooked by default
    by FPC. The run time errors/exception codes for these signals are
    resp. 217 and 233 (same as in Kylix; I changed ENoWideStringSupport
    to 234).
  * changed the BSD syscall version of fpsigaction to use pointer
    rather than "var" arguments (compatible with other targets, and
    required to be able to pass nil arguments inside the system unit)
  -> together fixes mantis #12704

git-svn-id: trunk@13077 -
2009-05-02 09:40:44 +00:00
Jonas Maebe
8cae53bb18 * fixed errors with parsing negative, >$99 and invalid BCD numbers in
BCDToInt() (patch from Milla, mantis #13512)

git-svn-id: trunk@13052 -
2009-04-27 16:46:42 +00:00
marco
e0a5de2280 * fix typo downstream from Debian (Mazen)
git-svn-id: trunk@12873 -
2009-03-10 07:26:11 +00:00
joost
1a4ee73146 * Added NoWideStringSupport runtime error
git-svn-id: trunk@10618 -
2008-04-08 21:19:52 +00:00
marco
9e1462203c * dateutils.scandatetime, an inverse of formatdatetime
git-svn-id: trunk@8624 -
2007-09-23 20:03:12 +00:00
florian
5a585ce07d * made SExecuteProcessFailed error message more clear
git-svn-id: trunk@8622 -
2007-09-23 14:59:22 +00:00
florian
a99b5470af * big variant from Thorsten Engler, fixes and improves several variant stuff
git-svn-id: trunk@6747 -
2007-03-07 20:45:06 +00:00
daniel
84982f2f62 + Add siconverror constant.
git-svn-id: trunk@5473 -
2006-11-25 09:49:27 +00:00
Jonas Maebe
2c3d8af195 * fixed typo (invalid type case -> invalid type cast)
git-svn-id: trunk@3025 -
2006-03-24 22:19:47 +00:00
florian
d4bb99a5fb + runerror 214: bus error/data misaligment
git-svn-id: trunk@1263 -
2005-10-03 08:25:20 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
florian
372711eea4 + a lot of vararray stuff 2005-03-28 13:38:05 +00:00
peter
ac95600774 * fixed str() call 2005-03-17 16:29:04 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
michael
e05a92537d + Implemented ForceDirectories for Delphi compatibility 2005-01-14 12:59:25 +00:00
olle
9a4855aa43 + added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
2004-09-03 19:25:21 +00:00
peter
0caeea9e61 * disbaled error 900 that is out of range 2004-08-25 15:29:58 +00:00
olle
6fae444a85 + added error 900, for macos 2004-08-20 10:18:58 +00:00
michael
70143302f0 + Fixed currency<->string conversion support 2004-06-12 13:23:17 +00:00
michael
f3519a496a + OSERRor related constants 2004-02-08 11:44:05 +00:00
Tomas Hajny
e0f9297e01 * ExecuteProcess fixes, ProcessID and ThreadID added 2004-01-20 23:05:31 +00:00
michael
1567dc0814 + Moved all resource strings to rtlconst/sysconst 2004-01-10 19:35:17 +00:00
michael
ea7ed753c8 + Changed lookup table with Case: Array of resourcestring is not translated 2004-01-10 17:55:45 +00:00
michael
530638348a + Removed old strings 2003-11-30 15:04:56 +00:00
michael
3730c41c50 + Added runerrors functionality to sysconst 2003-11-27 20:39:43 +00:00
michael
de16dcff56 + Some fixes to have everything compile again 2003-11-26 20:34:19 +00:00
florian
058d480f40 * error handling for Variants improved 2003-11-26 20:00:19 +00:00
florian
8d771df2d4 * arm fixes to the common rtl code
* some generic math code fixed
  * ...
2003-09-03 14:09:37 +00:00