throw exceptions if no company is found or no pending orders are found