2023-01-31 14:59 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

101 views
Skip to first unread message

Przemyslaw Czerpak

unread,
Jan 31, 2023, 8:59:24 AM1/31/23
to harbou...@googlegroups.com
2023-01-31 14:59 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapierr.h
* src/harbour.def
* src/rtl/errapi.c
+ added new C function:
void hb_errReinit( PHB_ITEM pError );
it allows to replace default error object with user custom one which
support :Init() method

* contrib/xhb/xhb.hbp
+ contrib/xhb/xhb.h
+ contrib/xhb/xhberror.prg
+ added code which extends Harbour error objects adding functionality
known from xHarbour:
oError:ProcName
oError:ProcLine
oError:ProcModule
Above instance variables are initialized automatically when error
object is created.
To enable this functionality it's enough to add to PRG code:
REQUEST xhb_ErrorNew

* contrib/xhb/xhberr.prg
* use error object :Proc*() methods if they are available
- removed PRG version of xhb_ErrorNew()

* contrib/xhb/xhbmemo.prg
* contrib/xhb/xhbtedit.prg
! use xhb_ErrorNew() instead of ErrorNew() which does not support
any parameters

* include/hbapicls.h
; typo in comment

best regards
Przemek

Grigory Filatov

unread,
Jan 31, 2023, 10:47:47 AM1/31/23
to Harbour Developers
Hello Przemek,

It seems that the needed file xhberror.c was missed at the github uploading.

Error E2194: Could not find file 'xhb\xhberror.c'

hbmk2[xhb]: Exit status: 6: failed in compilation (Harbour, C compiler, Resource compiler)

Regards,
Grigory Filatov

вторник, 31 января 2023 г. в 14:59:24 UTC+1, druzus:

Lailton Fernando Mariano

unread,
Jan 31, 2023, 9:59:04 PM1/31/23
to Harbour Developers
Hi Przemek,

Can you provide an example how to use it:

+ added new C function:
void hb_errReinit( PHB_ITEM pError );
it allows to replace default error object with user custom one which
support :Init() method

?

Thanks 

Reply all
Reply to author
Forward
0 new messages