I noticed that EStackOverflow, as defined in SysUtils.pas is marked as deprecated in Delphi 2009. I checked and it was also marked as deprecated in 2007. I have a Delphi 7 install disk here, but I thought I would ask if anyone knows when it was deprecated.
Additionally, does anyone know why, and what replaces it? I wrote a test application that causes a Stack Overflow through recursion, and I still get an EStackOverflow exception, but if I add a handler specifically for it then I get
[DCC Warning] Unit57.pas(85): W1000 Symbol 'EStackOverflow' is deprecated
I know that EStackOverflow descends from EExternal, and that I could trap EExternal and check ExceptionCode for STATUS_STACK_OVERFLOW, but that seems unnecessary since it still throws the EStackOverflow exception.
Is this just to discourage me from throwing an EStackOverflow in my own code?
(Yes, I realize the irony of asking a question about EStackOverflow on a website called StackOverflow, and yes I am completely serious.)
I don't have D5 here to say, but I barely remember the deprecated directive appeared only on D6.
As for StackOverflow exception, I think it's deprecated because is only for Delphi runtime environment to raise it.
EDIT: Based on the aggregate of all the answers, EStackOverflow was deprecated in Delphi 6 when the Deprecated keyword was introduced.
Just like in .NET, you cant really catch a StackOverflow exception, what do you recover to? Your code is most likely wrong if you need to catch one :)
I just checked my Delphi 6, and EStackOverflow is already deprecated. I don't have access to older versions of Delphi here.
I can't help you with the why or the possible replacement.
In Delphi 5 it's not yet deprecated.
edit: Actually, in Delphi 5, 'deprecated' is not a reserved word.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With