original_string: public function error($e): void
    {
      $this->has_error = true;
      self::has_error();
      $msg = [
        self::$line,
        self::get_log_line('ERROR DB!'),
        self::$line
      ];
      if ( \is_string($e) ){
        $msg[] = self::get_log_line('USER MESSAGE');
        $msg[] = $e;
      }
      else if ( method_exists($e, 'getMessage') ){
        $msg[] = self::get_log_line('DB MESSAGE');
        $msg[] = $e->getMessage();
      }
      $this->last_error = end($msg);
      $msg[] = self::get_log_line('QUERY');
      $msg[] = $this->last();
      if ( $this->last_params['values'] ){
        $msg[] =  self::get_log_line('VALUES');
        foreach ( $this->last_params['values'] as $v ){
          if ( $v === null ){
            $msg[] = 'NULL';
          }
          else if ( \is_bool($v) ){
            $msg[] = $v ? 'TRUE' : 'FALSE';
          }
          else if ( \is_string($v) ){
            $msg[] = str::is_buid($v) ? bin2hex($v) : str::cut($v, 30);
          }
          else{
            $msg[] = $v;
          }
        }
      }
      $msg[] =  self::get_log_line('BACKTRACE');
      $dbt = array_reverse(debug_backtrace());
      array_walk($dbt, function($a, $i) use(&$msg){
        $msg[] = str_repeat(' ', $i).($i ? '->' : '')."{$a['function']}  (".basename(dirname($a['file'])).'/'.basename($a['file']).":{$a['line']})";
      });
      $this->log(implode(PHP_EOL, $msg));
      if ( $this->on_error === self::E_DIE ){
        die(\defined('BBN_IS_DEV') && BBN_IS_DEV ? '<pre>'.PHP_EOL.implode(PHP_EOL, $msg).PHP_EOL.'</pre>' : 'Database error');
      }
    }
code: public function error($e): void
    {
      $this->has_error = true;
      self::has_error();
      $msg = [
        self::$line,
        self::get_log_line('ERROR DB!'),
        self::$line
      ];
      if ( \is_string($e) ){
        $msg[] = self::get_log_line('USER MESSAGE');
        $msg[] = $e;
      }
      else if ( method_exists($e, 'getMessage') ){
        $msg[] = self::get_log_line('DB MESSAGE');
        $msg[] = $e->getMessage();
      }
      $this->last_error = end($msg);
      $msg[] = self::get_log_line('QUERY');
      $msg[] = $this->last();
      if ( $this->last_params['values'] ){
        $msg[] =  self::get_log_line('VALUES');
        foreach ( $this->last_params['values'] as $v ){
          if ( $v === null ){
            $msg[] = 'NULL';
          }
          else if ( \is_bool($v) ){
            $msg[] = $v ? 'TRUE' : 'FALSE';
          }
          else if ( \is_string($v) ){
            $msg[] = str::is_buid($v) ? bin2hex($v) : str::cut($v, 30);
          }
          else{
            $msg[] = $v;
          }
        }
      }
      $msg[] =  self::get_log_line('BACKTRACE');
      $dbt = array_reverse(debug_backtrace());
      array_walk($dbt, function($a, $i) use(&$msg){
        $msg[] = str_repeat(' ', $i).($i ? '->' : '')."{$a['function']}  (".basename(dirname($a['file'])).'/'.basename($a['file']).":{$a['line']})";
      });
      $this->log(implode(PHP_EOL, $msg));
      if ( $this->on_error === self::E_DIE ){
        die(\defined('BBN_IS_DEV') && BBN_IS_DEV ? '<pre>'.PHP_EOL.implode(PHP_EOL, $msg).PHP_EOL.'</pre>' : 'Database error');
      }
    }
code_tokens: public function error ( $ e ) : void { $ this -> has_error = true ; self :: has_error ( ) ; $ msg = [ self :: $ line , self :: get_log_line ( 'ERROR DB!' ) , self :: $ line ] ; if ( \ is_string ( $ e ) ) { $ msg [ ] = self :: get_log_line ( 'USER MESSAGE' ) ; $ msg [ ] = $ e ; } else if ( method_exists ( $ e , 'getMessage' ) ) { $ msg [ ] = self :: get_log_line ( 'DB MESSAGE' ) ; $ msg [ ] = $ e -> getMessage ( ) ; } $ this -> last_error = end ( $ msg ) ; $ msg [ ] = self :: get_log_line ( 'QUERY' ) ; $ msg [ ] = $ this -> last ( ) ; if ( $ this -> last_params [ 'values' ] ) { $ msg [ ] = self :: get_log_line ( 'VALUES' ) ; foreach ( $ this -> last_params [ 'values' ] as $ v ) { if ( $ v === null ) { $ msg [ ] = 'NULL' ; } else if ( \ is_bool ( $ v ) ) { $ msg [ ] = $ v ? 'TRUE' : 'FALSE' ; } else if ( \ is_string ( $ v ) ) { $ msg [ ] = str :: is_buid ( $ v ) ? bin2hex ( $ v ) : str :: cut ( $ v , 30 ) ; } else { $ msg [ ] = $ v ; } } } $ msg [ ] = self :: get_log_line ( 'BACKTRACE' ) ; $ dbt = array_reverse ( debug_backtrace ( ) ) ; array_walk ( $ dbt , function ( $ a , $ i ) use ( & $ msg ) { $ msg [ ] = str_repeat ( ' ' , $ i ) . ( $ i ? '->' : '' ) . "{$a['function']}  (" . basename ( dirname ( $ a [ 'file' ] ) ) . '/' . basename ( $ a [ 'file' ] ) . ":{$a['line']})" ; } ) ; $ this -> log ( implode ( PHP_EOL , $ msg ) ) ; if ( $ this -> on_error === self :: E_DIE ) { die ( \ defined ( 'BBN_IS_DEV' ) && BBN_IS_DEV ? '<pre>' . PHP_EOL . implode ( PHP_EOL , $ msg ) . PHP_EOL . '</pre>' : 'Database error' ) ; } }
docstring: Set an error and acts appropriately based oon the error mode
  
  @param $e
  @return void
docstring_tokens: Set an error and acts appropriately based oon the error mode