original_string: public function errors($exit_on_error = false)
      {
          if (!empty($this->errors)) {
  
              foreach (gplcart_array_flatten($this->errors) as $error) {
                  $this->error($error);
              }
  
              $this->errors = array();
  
              if ($exit_on_error) {
                  $this->abort(1);
              }
          }
      }
code: public function errors($exit_on_error = false)
      {
          if (!empty($this->errors)) {
  
              foreach (gplcart_array_flatten($this->errors) as $error) {
                  $this->error($error);
              }
  
              $this->errors = array();
  
              if ($exit_on_error) {
                  $this->abort(1);
              }
          }
      }
code_tokens: public function errors ( $ exit_on_error = false ) { if ( ! empty ( $ this -> errors ) ) { foreach ( gplcart_array_flatten ( $ this -> errors ) as $ error ) { $ this -> error ( $ error ) ; } $ this -> errors = array ( ) ; if ( $ exit_on_error ) { $ this -> abort ( 1 ) ; } } }
docstring: Print and clear up all existing errors
  @param boolean $exit_on_error
docstring_tokens: Print and clear up all existing errors