is there any way to catch and log all errors in application. In the moment I use try catch blocks in places where I think error can occur. But is there a possibility to catch all errors in application level (I mean, can I put try catch block to project file or maybe some other trick will do it)?
You could also consider Eureka Log, which CodeGear themselves used for their PHP product. Eureka Log also has memory leak detection and allows you to have crash reports silently emailed, ftp'd, added to a bug tracking system automatically, or allows interactive crash dump submission.
It isn't free, but I think it is well worth the money. I honestly couldn't imagine using Delphi without it. Also, they have a .NET edition of the program as well.
One last feature that I love, is that you can actually configure the product to take different actions with certain exceptions, while still capturing others normally. I use this with some of the Indy exceptions that can be thrown:
Take a look at MadExcept. If you add it into your project, it automatically installs hooks that will catch all unhandled exceptions, generate very informative error reports, and even email them to you or post them to a web service. It's the next best thing to actually being able to attach the debugger to your clients' systems.
"Catching" an exception can mean many things: logging it, displaying it, acting on it, reraising it, or any combination of the above. The TApplication OnException handler will "catch" all unhandled main thread exceptions, but will not catch exceptions raised in threads. To do this you will need to implement your own thread exception handling. In my application framework (http://www.csinnovations.com/framework_overview.htm) I have code that will ensure that any exception can be logged (all unhandled exceptions and optionally any handled exceptions), and optionally displayed if it is in the main thread, regardless of whether it occurs in the main thread or any other thread. While it is not as comprehensive as MadExcept, it has all the functionality that is needed to handle exceptions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With