View Full Version : Speziall Exception handling
Anonymous
07-May-2005, 11:06 AM
hi
i like to set a own messagebox for a exception. i know there is in the eurekalog option a feature called "Exceptions,Type,Message". but if i do that, i will ever get this message is the dfined exception is raised. i like only for 3 of 5 sourcecode position this message displayed. can you understand me? my english is bad ;-)
i have in my source code 5 functions. in this 5 functions, the exception can raised. but what i now whant, is, that eurekalog only in 3 of this 5 positions call my self defined messagebox. how can i do that? :oops: :shock: :D
Anonymous
07-May-2005, 06:34 PM
hello again. a idea is to check in the eurekalog event "OnExceptionNotify" if it is the exception what i want to show (different) and if a variable from typ bool is true (to show the message)... like so:
void __fastcall TForm1::EurekaLog1ExceptionNotify(
TEurekaExceptionRecord &EurekaExceptionRecord, bool &Handled)
{
if(/*psycho_code*/ TheException == ESocketError && ShowMsgBox)
{
MessageBox(NULL,"There is a socket error!","Error",16);
}
}
now is my question how can i check with eurekalog what typ of exception it is... :roll:
Anonymous
07-May-2005, 06:34 PM
got it... seen a delphi example in the help (but i'm a C++ developer)... thanks anyway. btw: nice prog Fabio!! 8)
Anonymous
07-May-2005, 06:34 PM
oh but i got the original exception message also!! not everytime just from time to time....
is this a bug in eurekalog? i'm using still. 4.6.6
have the exception handling aktive but no typ/message, so there may not actually display any dialogs, or is this not true? i have now a different in the event "OnEurekaLogExceptionNotify" and works fine. but from time to time, the original exception will display also! :( :(
can you tell me why?
Anonymous
07-May-2005, 06:34 PM
oh... i got also a totaly other exception messagebox. i'm confused now... :roll: :?: :shock:
admin
11-May-2005, 01:47 PM
hi
i like to set a own messagebox for a exception. i know there is in the eurekalog option a feature called "Exceptions,Type,Message". but if i do that, i will ever get this message is the dfined exception is raised. i like only for 3 of 5 sourcecode position this message displayed. can you understand me? my english is bad ;-)
Don't worry, alto my english is bad! :-)
i have in my source code 5 functions. in this 5 functions, the exception can raised. but what i now whant, is, that eurekalog only in 3 of this 5 positions call my self defined messagebox. how can i do that? :oops: :shock: :D
You can try to use a code like this:
try
...
Your function code here...
...
except
SetCustomErrorMessage('Put your custom message here!!!');
try
StandardEurekaNotify(ExceptObject, ExceptAddr);
finally
SetCustomErrorMessage(''); // Remove any custom message.
end;
end;
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.