[Gambas-devel] Better error message suggestion

Benoit Minisini gambas at ...1...
Tue Jun 24 20:20:39 CEST 2008


On vendredi 20 juin 2008, Ron wrote:
> Hi,
>
> If you return a value within a subroutine where you forgot to specify
> the return value type for, you get the following error:
>
> "Cannot return a value in a procedure.."
> --
> PUBLIC SUB GetDeviceType()
>
>   ...
>   RETURN something
>
> END
> --
>
> It's maybe more clear to give something like "Return type not specified
> for subroutine at line 123 ...
>
> My 2ct
>
> Regards,
> Ron
>

Done in revision #1430. 

But it won't tell you the line number of the function declaration.

Regards,

-- 
Benoit Minisini




More information about the Devel mailing list