Thread: unhandled execption

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    58

    unhandled execption

    Hi, i got this program to book seats for a cinema show.if trying to book seats already booked,a exception is thrown.code is as follows.
    Code:
    try{
    		if(ifFoundBookedSeats==true){
    			if(invalidSeatList){
    				cout<<"\n$$$$$$$$$$$$$$4";
    			}
    			cout<<"\nsize"<<invalidSeats.size();
    			cout<<"\n &"<<invalidSeats[0];
    			cout<<"\n &"<<invalidSeats[1];
    			cout<<"\n &"<<invalidSeats[2];
               throw SeatsNotFreeException(invalidSeatList,invalidSeats.size());// error line
    		}
    	}
    	catch(SeatsNotFreeException ex){
           	//try booking alternative seats
    	//	if(ex.bookAlternativeSeats(showSeatList)==true){
        //        //replace invalid seat numbers with new seat numbers.
    	//		adjustSeatList(seatList,numOfSeats,invalidSeats,ex.getNewValidSeats());
        //        isSeatsBooked=true;
    	//	}
    	}

    when i run it,it gives me a error: unhandled excpetion at this line "throw SeatsNotFreeException(invalidSeatList,invalidSeats .size());"


    when i run it in dev c++... it works fine..no error


    run it in microsoft visual compiler.....dang..gives me error !

    help !!!!
    Last edited by rahulsk1947; 06-14-2009 at 03:24 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unhandled exceptions (throw with no try)
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 07-01-2006, 06:31 AM
  2. I got an unhandled exception!!
    By LegendBreath in forum Game Programming
    Replies: 7
    Last Post: 04-19-2005, 01:55 PM
  3. Unhandled Exception (Vectors)
    By wbeasl in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2004, 07:36 AM
  4. Unhandled Exceptions
    By nickname_changed in forum C# Programming
    Replies: 0
    Last Post: 03-13-2004, 08:00 PM
  5. unhandled exception error
    By trends in forum C++ Programming
    Replies: 4
    Last Post: 11-15-2002, 06:54 PM