Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: ymsg exception problem

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ymsg exception problem

    Last two catch statement produce two error message...what is the problem ??

    package ymsg.network;
     
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import java.lang.Throwable;
     
     
     
     
    public class Main
    {
     
     
        public static void main(String[] args)
        {
     
            {
                Session ss = new Session();
                try
                {
                    ss.login("username", "password");
                }
     
                catch (IllegalStateException ex)
                {
                    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
                }
                catch (IOException ex)
                {
                    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
                }
                catch (AccountLockedException ex)
                {
                     Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
                }
                catch (LoginRefusedException ex)
                {
                    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
                }
     
     
     
     
     
            }
     
         }
    }

    error_1:
    incompatible types
    found :ymsg.network.AccountLockedException
    required :java.lang.throwable


    error_2:
    incompatible types
    found :ymsg.network.LoginRefusedException
    required :java.lang.throwable
    Last edited by maruf10; September 19th, 2009 at 02:08 PM.


Similar Threads

  1. Error of "ClassNotFound Exception"
    By multicoder in forum Exceptions
    Replies: 3
    Last Post: July 1st, 2009, 03:58 PM
  2. Exception handling for TextFields
    By FretDancer69 in forum AWT / Java Swing
    Replies: 1
    Last Post: June 16th, 2009, 08:48 AM
  3. exception while Read very large file > 300 MB
    By ps.ganesh in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: June 12th, 2009, 12:39 AM
  4. Getting Null Pointer Exception in runtime
    By RoadRunner in forum Exceptions
    Replies: 1
    Last Post: April 26th, 2009, 02:21 PM
  5. Exception handling
    By AnithaBabu1 in forum Exceptions
    Replies: 6
    Last Post: August 27th, 2008, 10:37 AM