original_string: protected function getErrorDetails(\Exception $e, $trace = false)
      {
          $msg = $e->getMessage();
          if ($e instanceof DfException) {
              $context = $e->getContext();
              if (is_array($context)) {
                  $context = print_r($context, true);
              }
              if (!empty($context)) {
                  $msg .= "\nContext: " . $context;
              }
          }
  
          if ($trace === true) {
              $msg .= "\nTrace:\n" . $e->getTraceAsString();
          }
  
          return $msg;
      }
code: protected function getErrorDetails(\Exception $e, $trace = false)
      {
          $msg = $e->getMessage();
          if ($e instanceof DfException) {
              $context = $e->getContext();
              if (is_array($context)) {
                  $context = print_r($context, true);
              }
              if (!empty($context)) {
                  $msg .= "\nContext: " . $context;
              }
          }
  
          if ($trace === true) {
              $msg .= "\nTrace:\n" . $e->getTraceAsString();
          }
  
          return $msg;
      }
code_tokens: protected function getErrorDetails ( \ Exception $ e , $ trace = false ) { $ msg = $ e -> getMessage ( ) ; if ( $ e instanceof DfException ) { $ context = $ e -> getContext ( ) ; if ( is_array ( $ context ) ) { $ context = print_r ( $ context , true ) ; } if ( ! empty ( $ context ) ) { $ msg .= "\nContext: " . $ context ; } } if ( $ trace === true ) { $ msg .= "\nTrace:\n" . $ e -> getTraceAsString ( ) ; } return $ msg ; }
docstring: Returns details from exception.
  
  @param \Exception $e
  @param bool       $trace
  
  @return string
docstring_tokens: Returns details from exception .