mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 03:39:40 +01:00 
			
		
		
		
	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 -
This commit is contained in:
		
							parent
							
								
									5f0996d78d
								
							
						
					
					
						commit
						db6385ef33
					
				@ -82,6 +82,7 @@ resourcestring
 | 
			
		||||
  SNoThreadSupport       = 'Threads not supported. Recompile program with thread driver.';
 | 
			
		||||
  SMissingWStringManager = 'Widestring manager not available. Recompile program with appropriate manager.';
 | 
			
		||||
  SSigQuit               = 'SIGQUIT signal received.';
 | 
			
		||||
  SObjectCheckError      = 'Object reference is Nil';
 | 
			
		||||
  SOSError               = 'System error, (OS Code %d):'+LineEnding+'%s';
 | 
			
		||||
  SOutOfMemory           = 'Out of memory';
 | 
			
		||||
  SOverflow              = 'Floating point overflow';
 | 
			
		||||
 | 
			
		||||
@ -189,6 +189,7 @@ type
 | 
			
		||||
   EAbort           = Class(Exception);
 | 
			
		||||
   EAbstractError   = Class(Exception);
 | 
			
		||||
   EAssertionFailed = Class(Exception);
 | 
			
		||||
   EObjectCheck     = Class(Exception);
 | 
			
		||||
 | 
			
		||||
   EPropReadOnly = class(Exception);
 | 
			
		||||
   EPropWriteOnly = class(Exception);
 | 
			
		||||
 | 
			
		||||
@ -351,7 +351,7 @@ type
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
const
 | 
			
		||||
  exceptmap: array[0..27] of TExceptMapEntry = (
 | 
			
		||||
  exceptmap: array[0..28] of TExceptMapEntry = (
 | 
			
		||||
    (code: 200; cls: EDivByZero;     msg: @SDivByZero),
 | 
			
		||||
    (code: 201; cls: ERangeError;    msg: @SRangeError),
 | 
			
		||||
    (code: 202; cls: EStackOverflow; msg: @SStackOverflow),
 | 
			
		||||
@ -360,6 +360,7 @@ const
 | 
			
		||||
    (code: 207; cls: EInvalidOp;     msg: @SInvalidOp),
 | 
			
		||||
    { Delphi distinguishes reDivByZero from reZeroDivide, but maps both to code 200. }
 | 
			
		||||
    (code: 208; cls: EZeroDivide;    msg: @SZeroDivide),
 | 
			
		||||
    (code: 210; cls: EObjectCheck;   msg: @SObjectCheckError),
 | 
			
		||||
    (code: 211; cls: EAbstractError; msg: @SAbstractError),
 | 
			
		||||
    (code: 212; cls: EExternalException; msg: @SExternalException),
 | 
			
		||||
    (code: 214; cls: EBusError;      msg: @SBusError),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user