original_string: public function process_stage_package() {
          // now we've agreed on a format,
          // the caller is given control to package it up however it wants
          // and then the portfolio plugin is given control to do whatever it wants.
          try {
              $this->caller->prepare_package();
          } catch (portfolio_exception $e) {
              throw new portfolio_export_exception($this, 'callercouldnotpackage', 'portfolio', null, $e->getMessage());
          }
          catch (file_exception $e) {
              throw new portfolio_export_exception($this, 'callercouldnotpackage', 'portfolio', null, $e->getMessage());
          }
          try {
              $this->instance->prepare_package();
          }
          catch (portfolio_exception $e) {
              throw new portfolio_export_exception($this, 'plugincouldnotpackage', 'portfolio', null, $e->getMessage());
          }
          catch (file_exception $e) {
              throw new portfolio_export_exception($this, 'plugincouldnotpackage', 'portfolio', null, $e->getMessage());
          }
          return true;
      }
code: public function process_stage_package() {
          // now we've agreed on a format,
          // the caller is given control to package it up however it wants
          // and then the portfolio plugin is given control to do whatever it wants.
          try {
              $this->caller->prepare_package();
          } catch (portfolio_exception $e) {
              throw new portfolio_export_exception($this, 'callercouldnotpackage', 'portfolio', null, $e->getMessage());
          }
          catch (file_exception $e) {
              throw new portfolio_export_exception($this, 'callercouldnotpackage', 'portfolio', null, $e->getMessage());
          }
          try {
              $this->instance->prepare_package();
          }
          catch (portfolio_exception $e) {
              throw new portfolio_export_exception($this, 'plugincouldnotpackage', 'portfolio', null, $e->getMessage());
          }
          catch (file_exception $e) {
              throw new portfolio_export_exception($this, 'plugincouldnotpackage', 'portfolio', null, $e->getMessage());
          }
          return true;
      }
code_tokens: public function process_stage_package ( ) { // now we've agreed on a format, // the caller is given control to package it up however it wants // and then the portfolio plugin is given control to do whatever it wants. try { $ this -> caller -> prepare_package ( ) ; } catch ( portfolio_exception $ e ) { throw new portfolio_export_exception ( $ this , 'callercouldnotpackage' , 'portfolio' , null , $ e -> getMessage ( ) ) ; } catch ( file_exception $ e ) { throw new portfolio_export_exception ( $ this , 'callercouldnotpackage' , 'portfolio' , null , $ e -> getMessage ( ) ) ; } try { $ this -> instance -> prepare_package ( ) ; } catch ( portfolio_exception $ e ) { throw new portfolio_export_exception ( $ this , 'plugincouldnotpackage' , 'portfolio' , null , $ e -> getMessage ( ) ) ; } catch ( file_exception $ e ) { throw new portfolio_export_exception ( $ this , 'plugincouldnotpackage' , 'portfolio' , null , $ e -> getMessage ( ) ) ; } return true ; }
docstring: Processes the 'package' stage of the export
  
  @return bool whether or not to process the next stage. this is important as the control function is called recursively.
  @throws portfolio_export_exception
docstring_tokens: Processes the package stage of the export