Re: Error Code reserved by 4D

2018-02-03 Thread Alan Chan via 4D_Tech
Hi Arnaud,

I never use component and have no comment on it. For trigger, the $0 is vital 
for us. It did trap 4D error once in awhile on our development phase. -9998 is 
the most popular one:-) Of course, we also return our business rules error to 
$0.

Many 4D engine errors won't be trapped by error handler but mostly could be get 
around with extra coding. We are still in 15.5 and may be -20002 is new in 16 
or 16Rx

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>
>> Le 3 févr. 2018 à 11:18, Alan Chan via 4D_Tech <4d_tech@lists.4d.com> a 
>> écrit :
>> 
>> Hmm... I didn't see -20002 there.
>
>Hi Alan, 
>one or more not documented, you know…  ;-)
>I'd call that error "a method used as error handler must not have parameter, 
>including $0"
>
>I was questioning myself about its number, in the trigger range (-32000 .. 
>-15000). I may be wrong but it sounds like -20002 cannot be trapped by an 
>error handler, so chances to collide with a home made trigger error detected 
>by a error handler
>seems weak (or unlikely). 
>
>I'm also wondering about the $0 use (I have used it a bit more than in one 
>method in a v12 component… 😱)
>- those methods in my v12 component never never never encountered error (???)
>- it came after v12
>
>-- 
>Arnaud de Montard 
>
>

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Error Code reserved by 4D

2018-02-03 Thread Arnaud de Montard via 4D_Tech

> Le 3 févr. 2018 à 11:18, Alan Chan via 4D_Tech <4d_tech@lists.4d.com> a écrit 
> :
> 
> Hmm... I didn't see -20002 there.

Hi Alan, 
one or more not documented, you know…  ;-)
I'd call that error "a method used as error handler must not have parameter, 
including $0"

I was questioning myself about its number, in the trigger range (-32000 .. 
-15000). I may be wrong but it sounds like -20002 cannot be trapped by an error 
handler, so chances to collide with a home made trigger error detected by a 
error handler seems weak (or unlikely). 

I'm also wondering about the $0 use (I have used it a bit more than in one 
method in a v12 component… 😱)
- those methods in my v12 component never never never encountered error (???)
- it came after v12

-- 
Arnaud de Montard 



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Error Code reserved by 4D

2018-02-03 Thread Alan Chan via 4D_Tech
Hmm... I didn't see -20002 there.

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>which should logically exclude predefined error codes,
>but even then, you are not prohibited from using a certain range.
>
>http://doc.4d.com/4Dv16R4/4D/16-R4/Error-Codes.200-3316679.en.html

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Error Code reserved by 4D

2018-02-02 Thread Alan Chan via 4D_Tech
Thanks for the info.

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>adding to Tim's comments:
>
>you can return an arbitrary error code from on backup startup / shutdown
>
>http://doc.4d.com/4Dv16R4/4D/16-R4/On-Backup-Startup-database-method.301-3316874.en.html
>http://doc.4d.com/4Dv16R4/4D/16-R4/On-Backup-Shutdown-database-method.301-3316859.en.html
>
>which should logically exclude predefined error codes,
>but even then, you are not prohibited from using a certain range.
>
>http://doc.4d.com/4Dv16R4/4D/16-R4/Error-Codes.200-3316679.en.html
>
>2018/02/02 18:36、Alan Chan via 4D_Tech 
><4d_tech@lists.4d.com> のメール:
>Could anyone tell if 4D changes error code range reserved by 4D?
>
>

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Error Code reserved by 4D

2018-02-02 Thread Alan Chan via 4D_Tech
Hi Tim,

I meant under -15000 not 15000. 4D or OS reserved error code above -15000 if my 
memory serve me right. I'm not talking real system crash and just 2 error codes 
collide and cause confusion. We trap and also generate various error codes 
returning from
triggers when it doesn't meet specific business rules. The error codes would be 
converted to verbose form to users. We use error code from -15001 to -2.

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>Alan,
>
>Are you thinking about plugin id numbers?
>ftp://ftp.4d.com/ACI_TECHNICAL_NOTES/2009/MacOS/TN_2009_01-04_(JAN)/09-02_4D_Plug-in_Dev_Guide_-_Part_1.pdf
>{" You should pick a number between 15000 and 32767."}
>
>How would retuning a similar error code cause a crash?
>How are you returning the error code?
>
>-Tim
>
>
>-Original Message-
>From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Alan Chan via 
>4D_Tech
>Sent: Friday, February 02, 2018 1:36 AM
>To: 4d_tech@lists.4d.com
>Cc: Alan Chan 
>Subject: Error Code reserved by 4D
>
>I thought error codes under -15000 were not reserved by 4D. Now it produces 
>error -20002 that might crash with user generated error for business rules 
>control.
>
>Could anyone tell if 4D changes error code range reserved by 4D?
>
>TIA.
>
>Alan Chan
>
>4D iNug Technical <4d_tech@lists.4d.com> writes:
>>I just today got the -20002 error in a compiled database.
>>The issue is/was pointers.
>
>
>>I still have to use a different method to handle the error because I
>>get a -20002 (accessing a parameter that does not exist) error in compiled 
>>mode. I think this -20002 error is related to my usage of $0 in the normal 
>>context of this method ($0 is not used in the error handler context).  It 
>>looks like you also
>return a Boolean in $0 but you do not mention seeing the -20002 error; weird. 
>Have you have provoked your error handler in compiled mode?
>

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Error Code reserved by 4D

2018-02-02 Thread Keisuke Miyako via 4D_Tech
adding to Tim's comments:

you can return an arbitrary error code from on backup startup / shutdown

http://doc.4d.com/4Dv16R4/4D/16-R4/On-Backup-Startup-database-method.301-3316874.en.html
http://doc.4d.com/4Dv16R4/4D/16-R4/On-Backup-Shutdown-database-method.301-3316859.en.html

which should logically exclude predefined error codes,
but even then, you are not prohibited from using a certain range.

http://doc.4d.com/4Dv16R4/4D/16-R4/Error-Codes.200-3316679.en.html

2018/02/02 18:36、Alan Chan via 4D_Tech 
<4d_tech@lists.4d.com> のメール:
Could anyone tell if 4D changes error code range reserved by 4D?



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Error Code reserved by 4D

2018-02-02 Thread Timothy Penner via 4D_Tech
Alan,

Are you thinking about plugin id numbers?
ftp://ftp.4d.com/ACI_TECHNICAL_NOTES/2009/MacOS/TN_2009_01-04_(JAN)/09-02_4D_Plug-in_Dev_Guide_-_Part_1.pdf
{" You should pick a number between 15000 and 32767."}

How would retuning a similar error code cause a crash?
How are you returning the error code?

-Tim






-Original Message-
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Alan Chan via 
4D_Tech
Sent: Friday, February 02, 2018 1:36 AM
To: 4d_tech@lists.4d.com
Cc: Alan Chan 
Subject: Error Code reserved by 4D

I thought error codes under -15000 were not reserved by 4D. Now it produces 
error -20002 that might crash with user generated error for business rules 
control.

Could anyone tell if 4D changes error code range reserved by 4D?

TIA.

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>I just today got the -20002 error in a compiled database.
>The issue is/was pointers.


>I still have to use a different method to handle the error because I
>get a -20002 (accessing a parameter that does not exist) error in compiled 
>mode. I think this -20002 error is related to my usage of $0 in the normal 
>context of this method ($0 is not used in the error handler context).  It 
>looks like you also return a Boolean in $0 but you do not mention seeing the 
>-20002 error; weird. Have you have provoked your error handler in compiled 
>mode?
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**