How return an error ?

Girard Damien dam-pro.girard at laposte.net
Sat Feb 11 14:01:17 EST 2006


Le Sat, 11 Feb 2006 19:54:01 +0100, Jim Ault <JimAultWins at yahoo.com> a  
écrit:

> On 2/11/06 10:32 AM, "Girard Damien" <dam-pro.girard at laposte.net> wrote:
>
>> Hi all,
>>
>> I am making some useful library for my softwares, and I have got one
>> problem.
>>
>> How I return an error ?
>>
>> Because when I use "return", this doesn't work very great.
>>
>> on hellotest theNumber
>>    if isnumber(theNumber) is false then
>>      return "error"
>>    end if
>>    ...
>> end hellotest
>  You could try
>> on hellotest theNumber
>>    if isnumber(theNumber) is false then
>>      return isnumber(theNumber)
>>    end if
>
>
> but I don't know how useful this would be.
> What error message do you want to return?
>
> Jim Ault
> Las Vegas
>

I wan't to return a specific error message (internaly in Runrev), I wrote  
complex commands, who call a lot of subcommands and functions, and when an  
error is uncountered, I wan't to return it. The advantage is to permit to  
the developers to understand why there is an error. And this permit to the  
software to manage these errors. (For exemple, you call a command
in a try structure, and you can manage this error with catch).

--

Girard Damien



More information about the use-livecode mailing list