How do you prevent EurekaLog from sending a bug report?
Posted by on 28 September 2012 16:08
|
|
Many times you know that due to user input or other external factors, a line of code will sometimes generate a non-fatal exception in your application. You may not want your mailbox filled with silly bug reports about users entering bad passwords, Etc. Using a simple trick you can "hide" these expected exceptions from EurekaLog. EurekaLog will not trigger if you handle an exception locally with a TRY/EXCEPT block. Using such a block means you are expecting an exception in some code and will handle it yourself. You can also choose to silently ignore an exception if it is both expected and non-fatal to your program. Here are two examples. In the first button click handler we will let EL handle the exception. In the second click handler, we will completely ignore the exception: -------------------%------------------------ PROCEDURE TForm1.btnELHandlesExceptionClick(Sender : TObject); -------------------%------------------------ Note that both exceptions will be caught by your IDE debugger's exception handler, but only the first one will generate an EL bug report. You can configure your IDE debugger to ignore certain exception types, but that is for another article :-) | |
|