Exception handling help!

I'm having a hard time understanding how exception handling is implemented. I know that, for example:

If an array, stack, queue, any abstract data time is empty, then you can throw an exception which can output a message saying its empty or some sort.

What I'm confused is, what is the exception? Like in this case, do you have to make a function that outputs a message saying its empty? or is it a predefined function which you can just call upon as an exception?
closed account (18hRX9L8)
I suggest looking at a tutorial on exceptions. Check out ours: http://www.cplusplus.com/doc/tutorial/exceptions/ .
I have read this but I am still having a hard time understanding how it works.


I get the concept, if lets say a list is full, you can throw an exception to output a message/perform a visit when its full


But the exception that you THROW, is it like a user implemented method/function?
Can you read asm code? That will help.
TR 18015 (Technical Report on C++ Performance) http://www.open-std.org/jtc1/sc22/wg21/docs/TR18015.pdf section 5.4.1 gives an outline of the two principal implementation strategies.
What is asm code?

Sorry I'm just looking for a straight forward answer and not shuffle through 200 pages
bump, someone please explain this to me
Topic archived. No new replies allowed.