Stack with overflow and underflow exceptions