|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Searching an error in the whole classHi,
Is it possible to let the program jump to an error routine if an error occurs SOMEWHERE in the class? I cannot find the reason for an error in one of my apps the students use. This error occurs especially when lots of french letters and/or apostrophies are written, but it is not predictable. So I cannot try it for myself (what I did, but it didn't run into an error...) Of course, they use a compiled version of the program. So I have to log the error into a file and search for the reason. But with TRY etc. I can only catch an error within one specific function... Since I don't know where the error occurs, it would be nice to let the program jump into some "global" error routine. Thanks for your hints! Rolf ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gambas-user mailing list Gambas-user@... https://lists.sourceforge.net/lists/listinfo/gambas-user |
|
|
Re: Searching an error in the whole classOn mercredi 14 mai 2008, Rolf-Werner Eilert wrote:
> Hi, > > Is it possible to let the program jump to an error routine if an error > occurs SOMEWHERE in the class? > > I cannot find the reason for an error in one of my apps the students > use. This error occurs especially when lots of french letters and/or > apostrophies are written, but it is not predictable. So I cannot try it > for myself (what I did, but it didn't run into an error...) > > Of course, they use a compiled version of the program. So I have to log > the error into a file and search for the reason. But with TRY etc. I can > only catch an error within one specific function... Since I don't know > where the error occurs, it would be nice to let the program jump into > some "global" error routine. > > Thanks for your hints! > > Rolf > > Why can't you know where the error occurs? When you compile the program, check the check-box that tell the compiler to keep debuggin information inside the executable, and you will get the location of the error. You can even get the backtrace on the standard error output! Regards, -- Benoit Minisini ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gambas-user mailing list Gambas-user@... https://lists.sourceforge.net/lists/listinfo/gambas-user |
|
|
Re: Searching an error in the whole classBenoit Minisini schrieb:
> On mercredi 14 mai 2008, Rolf-Werner Eilert wrote: >> Hi, >> >> Is it possible to let the program jump to an error routine if an error >> occurs SOMEWHERE in the class? >> >> I cannot find the reason for an error in one of my apps the students >> use. This error occurs especially when lots of french letters and/or >> apostrophies are written, but it is not predictable. So I cannot try it >> for myself (what I did, but it didn't run into an error...) >> >> Of course, they use a compiled version of the program. So I have to log >> the error into a file and search for the reason. But with TRY etc. I can >> only catch an error within one specific function... Since I don't know >> where the error occurs, it would be nice to let the program jump into >> some "global" error routine. >> >> Thanks for your hints! >> >> Rolf >> >> > > Why can't you know where the error occurs? When you compile the program, check > the check-box that tell the compiler to keep debuggin information inside the > executable, and you will get the location of the error. You can even get the > backtrace on the standard error output! > > Regards, > You mean an error message like this? ###### This application has raised an unexpected error and must abort. [-1] Tab is not empty. Form 1.?.0 ###### What does this tell me, and how should I locate an error with this information? (This is an example from another program where I know how to produce a runtime error...) Regards Rolf ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gambas-user mailing list Gambas-user@... https://lists.sourceforge.net/lists/listinfo/gambas-user |
|
|
Re: Searching an error in the whole classOn mercredi 14 mai 2008, Rolf-Werner Eilert wrote:
> Benoit Minisini schrieb: > > On mercredi 14 mai 2008, Rolf-Werner Eilert wrote: > >> Hi, > >> > >> Is it possible to let the program jump to an error routine if an error > >> occurs SOMEWHERE in the class? > >> > >> I cannot find the reason for an error in one of my apps the students > >> use. This error occurs especially when lots of french letters and/or > >> apostrophies are written, but it is not predictable. So I cannot try it > >> for myself (what I did, but it didn't run into an error...) > >> > >> Of course, they use a compiled version of the program. So I have to log > >> the error into a file and search for the reason. But with TRY etc. I can > >> only catch an error within one specific function... Since I don't know > >> where the error occurs, it would be nice to let the program jump into > >> some "global" error routine. > >> > >> Thanks for your hints! > >> > >> Rolf > > > > Why can't you know where the error occurs? When you compile the program, > > check the check-box that tell the compiler to keep debuggin information > > inside the executable, and you will get the location of the error. You > > can even get the backtrace on the standard error output! > > > > Regards, > > You mean an error message like this? > > ###### > This application has raised an unexpected error and must abort. > > [-1] Tab is not empty. > > Form 1.?.0 > ###### > > What does this tell me, and how should I locate an error with this > information? (This is an example from another program where I know how > to produce a runtime error...) > > Regards > > Rolf > You get this message when you make your executable without the debugging information (so the interpreter can only print the class where the problem occurs, Form1). With debugging information, you should have a function name instead of "?", and a line number instead of "0". -- Benoit Minisini ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gambas-user mailing list Gambas-user@... https://lists.sourceforge.net/lists/listinfo/gambas-user |
|
|
Re: Searching an error in the whole classBenoit Minisini schrieb:
> On mercredi 14 mai 2008, Rolf-Werner Eilert wrote: >> Hi, >> >> Is it possible to let the program jump to an error routine if an error >> occurs SOMEWHERE in the class? >> >> I cannot find the reason for an error in one of my apps the students >> use. This error occurs especially when lots of french letters and/or >> apostrophies are written, but it is not predictable. So I cannot try it >> for myself (what I did, but it didn't run into an error...) >> >> Of course, they use a compiled version of the program. So I have to log >> the error into a file and search for the reason. But with TRY etc. I can >> only catch an error within one specific function... Since I don't know >> where the error occurs, it would be nice to let the program jump into >> some "global" error routine. >> >> Thanks for your hints! >> >> Rolf >> >> > > Why can't you know where the error occurs? When you compile the program, check > the check-box that tell the compiler to keep debuggin information inside the > executable, and you will get the location of the error. You can even get the > backtrace on the standard error output! > > Regards, > You were right, as usual :-) Just wanted to let you know, I forgot/didn't see the checkbox with the "keep debug information" thing. So at last I found the place the trouble began, and I hope I could get rid of it. By the way, does this have any influence on speed, efficiency etc. of the app being interpreted? After all, there is a checkbox... Regards, Rolf ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gambas-user mailing list Gambas-user@... https://lists.sourceforge.net/lists/listinfo/gambas-user |
|
|
Re: Searching an error in the whole classOn jeudi 15 mai 2008, Rolf-Werner Eilert wrote:
> Benoit Minisini schrieb: > > On mercredi 14 mai 2008, Rolf-Werner Eilert wrote: > >> Hi, > >> > >> Is it possible to let the program jump to an error routine if an error > >> occurs SOMEWHERE in the class? > >> > >> I cannot find the reason for an error in one of my apps the students > >> use. This error occurs especially when lots of french letters and/or > >> apostrophies are written, but it is not predictable. So I cannot try it > >> for myself (what I did, but it didn't run into an error...) > >> > >> Of course, they use a compiled version of the program. So I have to log > >> the error into a file and search for the reason. But with TRY etc. I can > >> only catch an error within one specific function... Since I don't know > >> where the error occurs, it would be nice to let the program jump into > >> some "global" error routine. > >> > >> Thanks for your hints! > >> > >> Rolf > > > > Why can't you know where the error occurs? When you compile the program, > > check the check-box that tell the compiler to keep debuggin information > > inside the executable, and you will get the location of the error. You > > can even get the backtrace on the standard error output! > > > > Regards, > > You were right, as usual :-) Just wanted to let you know, I > forgot/didn't see the checkbox with the "keep debug information" thing. > So at last I found the place the trouble began, and I hope I could get > rid of it. > > By the way, does this have any influence on speed, efficiency etc. of > the app being interpreted? After all, there is a checkbox... > > Regards, > > Rolf > Debugging information takes place (you can do the comparison). As for speed, a breakpoint is generated for each line of code, but it does nothing. So you maiy not notice anything. In the future, I plan to remove the useless breakpoint in that specific case. Regards, -- Benoit Minisini ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gambas-user mailing list Gambas-user@... https://lists.sourceforge.net/lists/listinfo/gambas-user |
| Free Forum Powered by Nabble | Forum Help |