[Gambas-user] Global error management routine

Richard Terry rterry at ...1823...
Thu May 23 00:26:34 CEST 2013


Benoît Minisini wrote:
> Le 22/05/2013 00:04, Richard Terry a écrit :
>   
>> Tobias Boege wrote:
>>     
>>> Hi Benoit,
>>>
>>> when programming a component in C/C++, one can use the error hook to execute
>>> a function when the interpreter is about to abort because of an error.
>>>
>>> In Gambas itself, we only have the local Catch blocks to execute code in
>>> case of error in this or any context above in the stack.
>>>
>>> However, there is no global error handling routine like the above error hook
>>> available for Gambas programs. It would be handy if the program ultimately
>>> has to tidy up some of its business before it is killed.
>>>
>>>       
>> I'd second that, though I'm technically incapable of
>> helping/understanding. Short of putting a catch statement in every
>> single subroutine there seems no way in gambas to stop a program
>> crashing when it enounters an unexpected error, which if you have others
>> using the program for some mission-critical purpose this is nothing
>> short of embarrassing/dangerous/annoying to the users.
>>     
>
> I will think about it...
>   

I think this is particularly important as I've noticed many instances 
where the IDE when it builds an executable does not pic up on subtle 
errors eg textbox1= "test" instead of textbox.text = "text", or where 
the IDE runs the program without an error but the EXE will crash.

>   
>> Though I use the latest packages for gambas3 I find the IDE crashes out
>> unexpectedly enough (e.g several times in a few hour session) for me to
>> have got into the habit of clicking the save button every few minutes as
>> in recent times I've lost e.g 30 mins of code due to the ide suddenly
>> 'disappearing'.
>>
>> Regards
>>
>> richard
>>     
>
> I have no crash, while I use the Gambas IDE every day. What package do 
> you use? What version? What kind of crash? Gambas error or segmentation 
> fault?... and so on.
>
>   
I use the Kendek ppa packages, so whatever version that is up to. There 
is no error to these crashes usually the IDE just vaporizes and 
disappears - its erratic - can go all day with no problem or occur 
several times in an hour, so have not been able to quantify this. 
Running on linux mint 14 Mate Desktop

Whilst on the topic of the IDE one long standing bug is that at some 
point after heavy use highlighting a line (s) by clicking a thte start 
and dragging the mouse down to then do something with it like delete 
en-mass fails and the line instead of being highlighted only the two 
columns of characters on the left hand side of the IDE change colour. 
Closing the IDE and reloading fixes the problem.

Something else - a "feature request": I find that when I'm programming 
I'm often working with a limited sub-set of subroutines eg half a dozen, 
jumping back and forth between them, running the  program, debugging 
etc. It would be really handy (and there is plenty of room in the IDE 
next to the definitions combo, to have a combo which would contain the 
last most frequently used subroutines listed. That way instead of having 
to scroll down a long list of definitions, or search, one could just use 
the combo to jump to where you wanted.

Having said all that the Gambas IDE is a dream compared to most IDE's - 
fabulous work.

Regards


Richard




More information about the User mailing list