Home Discussion Discuss: Logging an Exception in Java

  • Logging exceptionNigel Thomas December 20, 2012 at 11:41 AM

    In the example given above, if we look it into the last line of code : log.log(Level.INFO, "Array is blank", ex.getMessage()); we can see ex.getMessage() is being used. Why can't we use ex only while passing into the log()?

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java Beginners

exception
exception  chek in and check out exception in java   Please visit the following link: Checked and Unchecked Exception 

Java Interview Questions

Exception
Exception  whis is the Arithmetic Exception in java? or define Arithmetic Exception with exp?   Arithmetic Exception occurs, when you divide a number by zero. Example public class TryCatch { public static void main 

Java Interview Questions

exception
;Please visit the following links: http://www.roseindia.net/java/java-exception/user-defined-exception.shtml http://www.roseindia.net/java/exceptions/making 

Java Beginners

Exception
Exception  what is NullPointerException?   Hi, I java... package. The NullPointerException is thrown by the Java program at the time... in Java program: * If you are calling some method on the null object 

Java Beginners

Exception Java
Exception Java  Hi, What are the Exception Java? Thanks   Hi, Read it at Java Exception. Thanks 

Java Interview Questions

Java exception
Java exception  What happens if an exception is not caught 

Java Interview Questions

Java exception
Java exception  Can an exception be rethrown 

Java Interview Questions

Java Exception
Java Exception  Which is superclass of Exception 

Java Beginners

java exception
java exception   define an exception called no match exception tat z... { public static void main(String[] args) throws Exception { String z="Hello"; if(!z.equals("India")){ throw new Exception 

Java Interview Questions

Java exception
Java exception  What is the difference between Checked and Unchecked exception 

Java Interview Questions

Java exception
Java exception  What is the difference between exception and error 

Java Interview Questions

Java Exception
Java Exception  What are monitors 

Java Interview Questions

Java Exception
Java Exception  What are Chained Exceptions 

Java Interview Questions

Java exception
Java exception  What is NullPointerException and how to handle 

Java Interview Questions

Java Exception
Java Exception  What is the purpose of finalization 

Java Interview Questions

Java Exception
Java Exception  What is ?Resource leak 

Java Interview Questions

Java Exception
Java Exception  Why Errors are Not Checked 

Java Interview Questions

Java exception
Java exception  Can try statements be nested 

Java Interview Questions

Java Exception
Java Exception  Why Runtime Exceptions are Not Checked 

Java Beginners

Java Exception
Java Exception  Explain about checked and unchecked Exceptions... this exception will be caught by a well-written application and will also prompt... to the constructor. Well in this case the exception could be caught by the application 

Java Interview Questions

Java Exception
Java Exception  Can a catch block exist without a try block 

Java Interview Questions

Java Exception
Java Exception  If I write System.exit (0); at the end of the try block, will the finally block still execute 

Java Beginners

exception in java
exception in java  StringIndexOutOfBounds Exception in flames program   Hi Friend, We have providing you a program. Try it: import java.util.*; public class FlamesProgram{ static String name1 = ""; static 

Java Beginners

exception in java - Java Beginners
exception in java  exception in java 

Java Beginners

exception handling
exception handling   Give the exception hierarchy of Java.   Please visit the following links: http://www.roseindia.net/java/java-exception/exception-java.shtml http://www.roseindia.net/java/exceptions/exception 

Java Beginners

exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling 

Java Beginners

exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling 

Java Beginners

exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling 

Java Beginners

exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling 

Java Beginners

exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling 

DMCA.com