Subclassing Error
Posted: Mon Feb 20, 2023 11:41 am
Does anyone have an idea why even a very simple instantiation of an Error subclass crashes in my code?
class ADSError inherit Error
method @@Throw() as void pascal
local oCB as Codeblock
safedebout32( self:SubCode, self:FuncSym, self:CallFuncSym )
if !empty( errorblock() ) // ACCEPT22 nur TEST auf Errorblock
oCB := suspenderrorhandler(NULL_CODEBLOCK)
begin sequence
super:@@Throw()
recover
end sequence
reseterrorhandler( oCB )
endif
oCB := NULL_CODEBLOCK
return
END CLASS
function ADSErrorBildenAusFehlercode(dwErrorCode as dWord, cFunc as string, cCallFunc as string, cExtraInfo := "" as string) as ADSError pascal
local oError as ADSError
oError := ADSError{}
class ADSError inherit Error
method @@Throw() as void pascal
local oCB as Codeblock
safedebout32( self:SubCode, self:FuncSym, self:CallFuncSym )
if !empty( errorblock() ) // ACCEPT22 nur TEST auf Errorblock
oCB := suspenderrorhandler(NULL_CODEBLOCK)
begin sequence
super:@@Throw()
recover
end sequence
reseterrorhandler( oCB )
endif
oCB := NULL_CODEBLOCK
return
END CLASS
function ADSErrorBildenAusFehlercode(dwErrorCode as dWord, cFunc as string, cCallFunc as string, cExtraInfo := "" as string) as ADSError pascal
local oError as ADSError
oError := ADSError{}