throw an exception

hi everybody
it may sounds like a dump question,but i have a question is that how can I throw an exception in this case:

this is a method of my assignment that should be implemented!I dont know what it means by throws that certain exception!

/**
* Returns the Position of the first element of the List, or,
* if the List is empty, throws an exception.
*
* @return Position of first element in List.
* @exception ListEmptyException raised if the List is empty.
*/
virtual Position<T>* first() const throw(ListEmptyException){

return head;
}
hey
thank you for your ref
i have read it before and know the concept of exception but i dont know what does this method exactly have to do!
If the list is empty, then
throw ListEmptyException( /*whatever args I take*/ );

otherwise return a Position<T>* indexing the first item in the list.

Good luck!
Topic archived. No new replies allowed.