My error handler seems to be odd.
this just recently began.
It's not staying set on my default handler.
Is there a way to view the current error handler's target function it is currently set to?
Windows 10
MS-Visual C++ version 19
Harbour 3.2.0
FWH1095
the only thing different in my environment is a recent Windows Update.
error handler acting odd
- don lowenstein
- Posts: 196
- Joined: Mon Oct 17, 2005 9:09 pm
- Contact:
error handler acting odd
Don Lowenstein
www.laapc.com
www.laapc.com
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: error handler acting odd
Don,
Harbour uses function ErrorBlock( bNewErrorBlock ) --> bPreviousErrorBlock to set/retrieve the errorblock.
As it uses a codeBlock as the param there is no way to retrieve the used function from the codeBlock.
Anyhow, you can use the function __vmItemId( codeBlock ) to check the codeblock unique ID:
Harbour uses function ErrorBlock( bNewErrorBlock ) --> bPreviousErrorBlock to set/retrieve the errorblock.
As it uses a codeBlock as the param there is no way to retrieve the used function from the codeBlock.
Anyhow, you can use the function __vmItemId( codeBlock ) to check the codeblock unique ID:
Code: Select all
function Main()
local bErrorBlock := { || nil }
? __vmItemId( bErrorBlock )
? __vmItemId( ErrorBlock() ) // this one is different from bErrorBlock
return nil
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: error handler acting odd
A simpler way is to compare the codeBlocks:
Code: Select all
function Main()
local bErrorBlock := { || nil }
? bErrorBlock == ErrorBlock()
return nil
- don lowenstein
- Posts: 196
- Joined: Mon Oct 17, 2005 9:09 pm
- Contact:
Re: error handler acting odd
I found my problem thanks to your help, Antonio.
I trust all is well with you and wishing you the best.
Thank you.
Don
I trust all is well with you and wishing you the best.
Thank you.
Don
Don Lowenstein
www.laapc.com
www.laapc.com