error parameters

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error parameters

Aristedes Maniatis
I can't get the Active4D error codes to work. I presume I am just
missing something obivous, but it has been a very long day.

Here's the code which is sitting on the page that catches the error.

                        $ErrorMsg := "[" + $a4d_err_type + "]" + char(carriage return)
                       
                        $ErrorMsg := $ErrorMsg + "Description: " + $a4d_err_msg +
char(carriage return)
                        $ErrorMsg := $ErrorMsg + "Source: " + $a4d_err_path + char(carriage
return)
                        $ErrorMsg := $ErrorMsg + "Library and method: " + $a4d_err_method +
char(carriage return)
                        $ErrorMsg := $ErrorMsg + "Token: " + $a4d_err_token + char(carriage
return)
                        $ErrorMsg := $ErrorMsg + "After token: " + $a4d_err_after_token +
char(carriage return)
                        $ErrorMsg := $ErrorMsg + "Line number: " + $a4d_err_line_num
                        www_sendEmail ("Active4D error"; $ErrorMsg; ""; "[hidden email]")


Here is the corresponding email message.

[2]
Description: Indice out of range.
Source:
Library and method:
Token: 1
After token: ) + "...")
Line number: 260


Any thoughts as to why this is not working? Is anyone else using an
error page to catch Active4D errors? I wish I knew what page this error
was on.....


Ari Maniatis

-------------------------->
ish group pty ltd
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400   fax +61 2 9660 7400
http www.ish.com.au | email [hidden email]
PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8


Reply | Threaded
Open this post in threaded view
|

Re: error parameters

aparajita
Administrator
On Monday, October 28, 2002, at 04:22  AM, Aristedes Maniatis wrote:

> I can't get the Active4D error codes to work. I presume I am just
> missing something obivous, but it has been a very long day.
>
> Here's the code which is sitting on the page that catches the error.
>
> $ErrorMsg := "[" + $a4d_err_type + "]" + char(carriage return)
>
> $ErrorMsg := $ErrorMsg + "Description: " + $a4d_err_msg +
> char(carriage return)
> $ErrorMsg := $ErrorMsg + "Source: " + $a4d_err_path + char(carriage
> return)
> $ErrorMsg := $ErrorMsg + "Library and method: " + $a4d_err_method +
> char(carriage return)
> $ErrorMsg := $ErrorMsg + "Token: " + $a4d_err_token + char(carriage
> return)
> $ErrorMsg := $ErrorMsg + "After token: " + $a4d_err_after_token +
> char(carriage return)
> $ErrorMsg := $ErrorMsg + "Line number: " + $a4d_err_line_num
> www_sendEmail ("Active4D error"; $ErrorMsg; "";
> "[hidden email]")
>
>
> Here is the corresponding email message.
>
> [2]
> Description: Indice out of range.
> Source:
> Library and method:
> Token: 1
> After token: ) + "...")
> Line number: 260

It looks to me like the only thing missing is the source. And a quick
look at the docs indicates that might be because you used $a4d_err_path
instead of $a4d_err_source_path, which is the correct name. Indeed, it
must have been a very long day.

If I may, I would like to make a few small observations about the code:

- Instead of using
         $ErrorMsg := $ErrorMsg + <something>
    it is more efficient to use
         $ErrorMsg += <something>

- Instead of using char(carriage return) over and over again, it would
be far more efficient to declare a local $CR and use that.

Small little things, but I thought I would mention it.

Regards,

    Aparajita
    Victory-Heart Productions
    [hidden email]
    www.aparajitaworld.com


Reply | Threaded
Open this post in threaded view
|

Re: error parameters

Aristedes Maniatis
Thank you Aparajita. It has indeed been a long day - you know one of
those days when every choice you make turns out to be the most
convoluted way to achieve the simplest goals. And regex in Apache
rewrite rules is just one of those things you need have a clear head
for...

Thank you again, and to the list for bearing with me. I can only say
that Active4D is one of those products that looks simple enough to just
start coding, and then consult the manual when there are specific
needs. One day I'll sit down and read it through properly. I'll try to
be careful not to bother the list so much...


Cheers

Ari Maniatis


On Tuesday, October 29, 2002, at 01:29  AM, Aparajita Fishman wrote:

> And a quick look at the docs indicates that might be because you used
> $a4d_err_path instead of $a4d_err_source_path, which is the correct
> name. Indeed, it must have been a very long day.



-------------------------->
ish group pty ltd
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400   fax +61 2 9660 7400
http www.ish.com.au | email [hidden email]
PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8