#include <iostream>
using namespace std;

#include "stackarray.h"

int main() {
	StackWithArray<int> s(10);
	try {
		s.push(2);
		while (true)
			s.pop();
	} catch (StackError& e) {
		// hier worden alle generieke StackError's opgevangen
		e.print();
	}
	try {
		while(true)
			s.push(3);
	} catch (StackPushError& e) {
		// hier wordt alleen de specifieke StackPushError opgevangen
		e.print();
	}
	cin.get();
	cin.get();
	return 0;
}
