int main() { { Intern idiotOne; Bureaucrat hermes = Bureaucrat("Hermes Conrad", 37); Bureaucrat bob = Bureaucrat("Bobby Bobson", 123); OfficeBlock ob; ob.setIntern(idiotOne); ob.setSigner(bob); ob.setExecutor(hermes); try { ob.doBureaucracy("mutant pig termination", "Pigley"); } catch (std::exception& e) { std::cout << e.what() << std::endl; } } { Intern idiotOne; Bureaucrat hermes = Bureaucrat("Hermes Conrad", 1); Bureaucrat bob = Bureaucrat("Bobby Bobson", 1); OfficeBlock ob; ob.setIntern(idiotOne); ob.setSigner(bob); ob.setExecutor(hermes); try { ob.doBureaucracy("presidential pardon", "sysy"); } catch (std::exception& e) { std::cout << e.what() << std::endl; } } return 0; }
int main(void) { Intern idiotOne; Bureaucrat hermes = Bureaucrat("Hermes Conrad", 37); Bureaucrat bob = Bureaucrat("Bobby Bobson", 123); OfficeBlock ob; ob.setIntern(idiotOne); ob.setSigner(bob); ob.setExecutor(hermes); try { ob.doBureaucracy("shrubbery creation", "Pigley"); } catch (OfficeBlock::IncompleteOfficeException & e) { std::cout << e.what() << std::endl; } catch (Form::GradeTooLowException & e) { std::cout << e.what() << std::endl; } OfficeBlock ob2; try { ob2.doBureaucracy("presidential pardon", "John Doe"); } catch (OfficeBlock::IncompleteOfficeException & e) { std::cout << e.what() << std::endl; } catch (std::exception & e) { std::cout << e.what() << std::endl; } try { ob.doBureaucracy("cacac", "John Doe"); } catch (OfficeBlock::IncompleteOfficeException & e) { std::cout << e.what() << std::endl; } catch (Intern::InvalidFormNameException & e) { std::cout << e.what() << std::endl; } return (0); }