You should rather ask how exception work and how to process them.
What you ask is not a question: you can throw any object of any type, your own or not:
throw 9000;
throw "some stupid immediate constant";
throw SomeInstanceOfMySophisticatedClass;
throw MySophisticatedClass(
"some stupid immediate constant used to construct my class");
(This is so with C++. With most other languages you most usually can throw (or raise, another term for exact same thing) only the classes derived from a single class used as the only valid base class for all exception types.)
Will it help you? I think you should understand background.
I'm not familiar with any literature on basics; you can start here:
http://en.wikipedia.org/wiki/Exception_handling[
^].
You should be comfortable with exception techniques: they are so important that these days programming without exception skill would be practically useless activity.