original_string: private function send_to_handler() {
          try {
              mtrace("--> Passing to Inbound Message handler {$this->addressmanager->get_handler()->classname}");
              if ($result = $this->addressmanager->handle_message($this->currentmessagedata)) {
                  $this->inform_user_of_success($this->currentmessagedata, $result);
                  // Request that this message be marked for deletion.
                  return true;
              }
  
          } catch (\core\message\inbound\processing_failed_exception $e) {
              mtrace("-> The Inbound Message handler threw an exception. Unable to process this message. The user has been informed.");
              mtrace("--> " . $e->getMessage());
              // Throw the exception again, with additional data.
              $error = new \stdClass();
              $error->subject     = $this->currentmessagedata->envelope->subject;
              $error->message     = $e->getMessage();
              throw new \core\message\inbound\processing_failed_exception('messageprocessingfailed', 'tool_messageinbound', $error);
  
          } catch (\Exception $e) {
              mtrace("-> The Inbound Message handler threw an exception. Unable to process this message. User informed.");
              mtrace("--> " . $e->getMessage());
              // An unknown error occurred. Still inform the user but, this time do not include the specific
              // message information.
              $error = new \stdClass();
              $error->subject     = $this->currentmessagedata->envelope->subject;
              throw new \core\message\inbound\processing_failed_exception('messageprocessingfailedunknown',
                      'tool_messageinbound', $error);
  
          }
  
          // Something went wrong and the message was not handled well in the Inbound Message handler.
          mtrace("-> The Inbound Message handler reported an error. The message may not have been processed.");
  
          // It is the responsiblity of the handler to throw an appropriate exception if the message was not processed.
          // Do not inform the user at this point.
          return false;
      }
code: private function send_to_handler() {
          try {
              mtrace("--> Passing to Inbound Message handler {$this->addressmanager->get_handler()->classname}");
              if ($result = $this->addressmanager->handle_message($this->currentmessagedata)) {
                  $this->inform_user_of_success($this->currentmessagedata, $result);
                  // Request that this message be marked for deletion.
                  return true;
              }
  
          } catch (\core\message\inbound\processing_failed_exception $e) {
              mtrace("-> The Inbound Message handler threw an exception. Unable to process this message. The user has been informed.");
              mtrace("--> " . $e->getMessage());
              // Throw the exception again, with additional data.
              $error = new \stdClass();
              $error->subject     = $this->currentmessagedata->envelope->subject;
              $error->message     = $e->getMessage();
              throw new \core\message\inbound\processing_failed_exception('messageprocessingfailed', 'tool_messageinbound', $error);
  
          } catch (\Exception $e) {
              mtrace("-> The Inbound Message handler threw an exception. Unable to process this message. User informed.");
              mtrace("--> " . $e->getMessage());
              // An unknown error occurred. Still inform the user but, this time do not include the specific
              // message information.
              $error = new \stdClass();
              $error->subject     = $this->currentmessagedata->envelope->subject;
              throw new \core\message\inbound\processing_failed_exception('messageprocessingfailedunknown',
                      'tool_messageinbound', $error);
  
          }
  
          // Something went wrong and the message was not handled well in the Inbound Message handler.
          mtrace("-> The Inbound Message handler reported an error. The message may not have been processed.");
  
          // It is the responsiblity of the handler to throw an appropriate exception if the message was not processed.
          // Do not inform the user at this point.
          return false;
      }
code_tokens: private function send_to_handler ( ) { try { mtrace ( "--> Passing to Inbound Message handler {$this->addressmanager->get_handler()->classname}" ) ; if ( $ result = $ this -> addressmanager -> handle_message ( $ this -> currentmessagedata ) ) { $ this -> inform_user_of_success ( $ this -> currentmessagedata , $ result ) ; // Request that this message be marked for deletion. return true ; } } catch ( \ core \ message \ inbound \ processing_failed_exception $ e ) { mtrace ( "-> The Inbound Message handler threw an exception. Unable to process this message. The user has been informed." ) ; mtrace ( "--> " . $ e -> getMessage ( ) ) ; // Throw the exception again, with additional data. $ error = new \ stdClass ( ) ; $ error -> subject = $ this -> currentmessagedata -> envelope -> subject ; $ error -> message = $ e -> getMessage ( ) ; throw new \ core \ message \ inbound \ processing_failed_exception ( 'messageprocessingfailed' , 'tool_messageinbound' , $ error ) ; } catch ( \ Exception $ e ) { mtrace ( "-> The Inbound Message handler threw an exception. Unable to process this message. User informed." ) ; mtrace ( "--> " . $ e -> getMessage ( ) ) ; // An unknown error occurred. Still inform the user but, this time do not include the specific // message information. $ error = new \ stdClass ( ) ; $ error -> subject = $ this -> currentmessagedata -> envelope -> subject ; throw new \ core \ message \ inbound \ processing_failed_exception ( 'messageprocessingfailedunknown' , 'tool_messageinbound' , $ error ) ; } // Something went wrong and the message was not handled well in the Inbound Message handler. mtrace ( "-> The Inbound Message handler reported an error. The message may not have been processed." ) ; // It is the responsiblity of the handler to throw an appropriate exception if the message was not processed. // Do not inform the user at this point. return false ; }
docstring: Send the message to the appropriate handler.
  
  @return bool
  @throws \core\message\inbound\processing_failed_exception if anything goes wrong.
docstring_tokens: Send the message to the appropriate handler .