AnsweredAssumed Answered

vrf GetName of the actual Function

Question asked by VRFuser on Dec 2, 2003
Very good suggestion, Dara. I have a suggestion of my own for VEE Future. Since
VEE obviously has to keep a stack of its own, why can't it share that
information with us if we ask for it? Something like an "ErrorStack()" call,
where we could get a 1D array back with the lowest element being the UF where
the error occurred. Like I said, just a suggestion.

BTW, I have a suggestion for the VEE programmers, especially the newer ones.
Yes, it takes more time and more code, but I REALLY try to make all my UF's
"bullet proof". To do this, you must check all incoming data for out of range,
or invalid data conditions, especially when dealing with user inputs, or raw
data coming off an instrument. Test for possible math errors, like divide by
zero and the like, BEFORE doing the actual math. By doing the extra work, almost
all the "dumb" BRB's will go away and your programs will be a lot less prone to
explode.

Cheers!
Mike Groves

-----Original Message-----
From: SARIASLANI,DARA (A-Sonoma,ex1)
[mailto:dara_sariaslani@agilent.com]
Sent: Tuesday, December 02, 2003 6:46 PM
To: VRF
Subject: [vrf] RE: GetName of the actual Function


A while back, I wrote a test sequencing application in VEE, where I wanted to
provide meaningful error information to the user and as part of that I wanted to
state the function name and the library name of the object where the error was
generated.  To do this I created a global variable (a record) in my main program
and the first thing I did in each UserFunction, was to set the function name and
library name fields of this record.  After that, if there was an error in that
UserFunction, I would trap the error and check the value of the record to see
which function it was last set in.  You can make this more elaborate by creating
an array of records and producing an entire call stack, if your errors are
propagated through multiple layers of functions.

Regards,

Dara Sariaslani
Agilent Technologies

-----Original Message-----
From: "Martn Castillejos, Juan Carlos" [mailto:jcmartin@indra.es]
Sent: Friday, November 28, 2003 1:17 AM
Subject: RE: GetName of the actual Function



errorInfo() VEE function provides you information about the error. However it
does not provide you which is the function/user object with the error. As
maximum, if you title each object with a specific text (If possible, I use to
copy internal data of a formula in its title of object) , you could find where
the error appears because errorInfo() provides you the name of the object and
its code number.

Therefore, your general purpose I don't know the answer. However, if you are
interested in a few user functions or user objects, you could create your own
error codes by using "Raise Error" object.

regards,


> -----Mensaje original-----
> De: gerhard.schmid@smart-gmbh.de [mailto:gerhard.schmid@smart-gmbh.de]
> Enviado el: jueves, 27 de noviembre de 2003 10:16
> Para: VRF
> Asunto: [vrf] GetName of the actual Function
>
>
>
> For automatic Error-Generation I need the
> name of the actual (User)Function.
> Is there a chance to get this name?
>
>
>
>
> ---
> You are currently subscribed to vrf as: jcmartin@indra.es
> To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
> To unsubscribe send a blank email to
> "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list,  email "vrf@agilent.com".
> If you need help with the mailing list send a message to
> "owner-vrf@it.lists.it.agilent.com".
>
--------------------------------------------------------------------------------
-----------------------------------
Este correo electrnico y, en su caso, cualquier fichero anexo al mismo,
contiene informacin de carcter confidencial exclusivamente dirigida a su
destinatario o destinatarios. Queda prohibida su divulgacin, copia o
distribucin a terceros sin la previa autorizacin escrita de Indra. En el caso
de haber recibido este correo electrnico por error, se ruega notificar
inmediatamente esta circunstancia mediante reenvo a la direccin electrnica
del remitente.

The information in this e-mail and in any attachments is confidential and solely
for the attention and use of the named addressee(s). You are hereby notified
that any dissemination, distribution or copy of this communication is prohibited
without the prior written consent of Indra. If you have received this
communication in error, please, notify the sender by reply e-mail

---
You are currently subscribed to vrf as: mikegroves@pacbell.net
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".


---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes