original_string: private static function applicationErrorToException($error,
                                                        $destination_url) {
      switch ($error->getApplicationError()) {
        case ErrorCode::REDIRECT_URL_TOO_LONG:
          return new UsersException('URL too long: ' . $destination_url);
        case ErrorCode::NOT_ALLOWED:
          return new UsersException('Action not allowed.');
        default:
          return new UsersException(
              'Error code: ' . $error->getApplicationError());
      }
    }
code: private static function applicationErrorToException($error,
                                                        $destination_url) {
      switch ($error->getApplicationError()) {
        case ErrorCode::REDIRECT_URL_TOO_LONG:
          return new UsersException('URL too long: ' . $destination_url);
        case ErrorCode::NOT_ALLOWED:
          return new UsersException('Action not allowed.');
        default:
          return new UsersException(
              'Error code: ' . $error->getApplicationError());
      }
    }
code_tokens: private static function applicationErrorToException ( $ error , $ destination_url ) { switch ( $ error -> getApplicationError ( ) ) { case ErrorCode :: REDIRECT_URL_TOO_LONG : return new UsersException ( 'URL too long: ' . $ destination_url ) ; case ErrorCode :: NOT_ALLOWED : return new UsersException ( 'Action not allowed.' ) ; default : return new UsersException ( 'Error code: ' . $ error -> getApplicationError ( ) ) ; } }
docstring: Convert a UserService RPC error to an exception.
  
  @param mixed $error The application error object.
  @param string $destination_url A URL that was used for the RPC call.
  
  @return mixed The correct exception object for the supplied error.
  
  @access private.
docstring_tokens: Convert a UserService RPC error to an exception .