original_string: public static function toArray($e, $getTrace = true, $catcher = null)
      {
          $data = [
              'class' => \get_class($e),
              'message' => $e->getMessage(),
              'code' => $e->getCode(),
              'file' => $e->getFile() . ':' . $e->getLine(),
          ];
  
          if ($catcher) {
              $data['catcher'] = $catcher;
          }
  
          if ($getTrace) {
              $data['trace'] = $e->getTrace();
          }
  
          return $data;
      }
code: public static function toArray($e, $getTrace = true, $catcher = null)
      {
          $data = [
              'class' => \get_class($e),
              'message' => $e->getMessage(),
              'code' => $e->getCode(),
              'file' => $e->getFile() . ':' . $e->getLine(),
          ];
  
          if ($catcher) {
              $data['catcher'] = $catcher;
          }
  
          if ($getTrace) {
              $data['trace'] = $e->getTrace();
          }
  
          return $data;
      }
code_tokens: public static function toArray ( $ e , $ getTrace = true , $ catcher = null ) { $ data = [ 'class' => \ get_class ( $ e ) , 'message' => $ e -> getMessage ( ) , 'code' => $ e -> getCode ( ) , 'file' => $ e -> getFile ( ) . ':' . $ e -> getLine ( ) , ] ; if ( $ catcher ) { $ data [ 'catcher' ] = $ catcher ; } if ( $ getTrace ) { $ data [ 'trace' ] = $ e -> getTrace ( ) ; } return $ data ; }
docstring: Converts an exception into a simple array.
  @param \Exception|\Throwable $e the exception being converted
  @param bool $getTrace
  @param null|string $catcher
  @return array
docstring_tokens: Converts an exception into a simple array .