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{}
Subclassing Error
Subclassing Error
Hi Stefan,
There's a lot of unknown things in the sample you posted, can you please a compilable sample showing the problem?
Also in which line does the crash happen? Isn't there an exception message shown?
.
There's a lot of unknown things in the sample you posted, can you please a compilable sample showing the problem?
Also in which line does the crash happen? Isn't there an exception message shown?
.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Subclassing Error
I'm sorry, but it seems to be an error in my callstack. If I write a 5-Liner it works; looks like it does in my code as well but logs a misleading call stack on the debug console. Please close the case.