original_string: protected function onError() {
          global $OUTPUT;
  
          $message = $this->message;
          if ($this->debugMode && !empty($this->reason)) {
              $message = $this->reason;
          }
  
          // Display the error message from the provider's side if the consumer has not specified a URL to pass the error to.
          if (empty($this->returnUrl)) {
              $this->errorOutput = $OUTPUT->notification(get_string('failedrequest', 'enrol_lti', ['reason' => $message]), 'error');
          }
      }
code: protected function onError() {
          global $OUTPUT;
  
          $message = $this->message;
          if ($this->debugMode && !empty($this->reason)) {
              $message = $this->reason;
          }
  
          // Display the error message from the provider's side if the consumer has not specified a URL to pass the error to.
          if (empty($this->returnUrl)) {
              $this->errorOutput = $OUTPUT->notification(get_string('failedrequest', 'enrol_lti', ['reason' => $message]), 'error');
          }
      }
code_tokens: protected function onError ( ) { global $ OUTPUT ; $ message = $ this -> message ; if ( $ this -> debugMode && ! empty ( $ this -> reason ) ) { $ message = $ this -> reason ; } // Display the error message from the provider's side if the consumer has not specified a URL to pass the error to. if ( empty ( $ this -> returnUrl ) ) { $ this -> errorOutput = $ OUTPUT -> notification ( get_string ( 'failedrequest' , 'enrol_lti' , [ 'reason' => $ message ] ) , 'error' ) ; } }
docstring: Override onError for custom error handling.
  @return void
docstring_tokens: Override onError for custom error handling .