diff options
author | Michael Abed <michaelabed@gmail.com> | 2012-11-27 12:21:46 -0500 |
---|---|---|
committer | Michael Abed <michaelabed@gmail.com> | 2012-11-27 12:21:46 -0500 |
commit | 481468176e30c07872aea61ef65ba9156efd0fa6 (patch) | |
tree | b5c2baf819af6cb51d9dc5e3bd9e54414789b494 /PassengerException.h | |
download | ec327-lab4-master.tar.gz ec327-lab4-master.tar.bz2 ec327-lab4-master.zip |
Diffstat (limited to 'PassengerException.h')
-rw-r--r-- | PassengerException.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/PassengerException.h b/PassengerException.h new file mode 100644 index 0000000..8acb395 --- /dev/null +++ b/PassengerException.h @@ -0,0 +1,18 @@ +#ifndef PASSENGEREXCEPTION_H +#define PASSENGEREXCEPTION_H + +#include<stdexcept> +using namespace std; + +// ALL YOU HAVE TO DO IS FIX #1 and #2. The rest comes down to the try and catch blocks you need to use in your main to test things out. + +class PassengerException: public logic_error +{ + public: + PassengerException(int request, int capacity): logic_error("Passenger Issues") + { + cout << "The requested int for passenger manipulation " << request << " is outside the capacity " << capacity << endl; + } +}; +#endif + |