summaryrefslogtreecommitdiff
path: root/PassengerException.h
diff options
context:
space:
mode:
authorMichael Abed <michaelabed@gmail.com>2012-11-27 12:21:46 -0500
committerMichael Abed <michaelabed@gmail.com>2012-11-27 12:21:46 -0500
commit481468176e30c07872aea61ef65ba9156efd0fa6 (patch)
treeb5c2baf819af6cb51d9dc5e3bd9e54414789b494 /PassengerException.h
downloadec327-lab4-master.tar.gz
ec327-lab4-master.tar.bz2
ec327-lab4-master.zip
add lab 4HEADmaster
Diffstat (limited to 'PassengerException.h')
-rw-r--r--PassengerException.h18
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
+