Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception Driven Programming in Java [closed]

Tags:

I just finished reading Exception Driven Programming and I'm wondering about something like ELMAH for Java. Did you know it?

Interesting features:

  • A web page to remotely view the entire log of recoded exceptions
  • A web page to remotely view the full details of any one logged exception
  • An e-mail notification of each error at the time it occurs
  • An RSS feed of the last 15 errors from the log
  • other interface (JSON, RESTful interface, etc)
  • A number of backing storage implementations for the log, including in-memory, JDBC, JMS, etc
  • open source

NOTE

log4j is for logging, it is not an integrated solution for exception handling

like image 596
dfa Avatar asked Apr 17 '09 13:04

dfa


People also ask

What are the different types of exception handling in Java?

Customized Exception Handling : Java exception handling is managed via five keywords: try, catch, throw, throws, and finally. Briefly, here is how they work. Program statements that you think can raise exceptions are contained within a try block. If an exception occurs within the try block, it is thrown.

What is an exception in programming?

An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at run time, that disrupts the normal flow of the program’s instructions.

How do you handle system-generated exceptions in Java?

If an exception occurs within the try block, it is thrown. Your code can catch this exception (using catch block) and handle it in some rational manner. System-generated exceptions are automatically thrown by the Java run-time system.

How do you throw an exception explicitly in Java?

The Java throw keyword is used to explicitly throw a single exception. When we throw an exception, the flow of the program moves from the try block to the catch block. In the above example, we are explicitly throwing the ArithmeticException using the throw keyword.


1 Answers

This is an old question but I don't see an accepted answer so...

I'm pleased to announce v3.0 of LogDigger Connector library that:

  • In case of an error, collects request-level data and logs.
  • Can use memory or JDBC for storage.
  • Has a built-in web interface (similar to ELMAH).
  • Can send notifications via email, you can collect them using RSS or implement your own mechanism.
  • Can track user actions and have the recent usage history included with the error report.
  • Is quite lightweight (500KB) an has no external dependencies (except JDBC driver obviously and JavaMail API if you want to send email).
like image 66
tomsame Avatar answered Sep 21 '22 21:09

tomsame