original_string: protected function emitError($code, $msg)
      {
          $this->_status = self::STATUS_CLOSING;
          if ($this->onError) {
              try {
                  call_user_func($this->onError, $this, $code, $msg);
              } catch (\Exception $e) {
                  Worker::log($e);
                  exit(250);
              } catch (\Error $e) {
                  Worker::log($e);
                  exit(250);
              }
          }
      }
code: protected function emitError($code, $msg)
      {
          $this->_status = self::STATUS_CLOSING;
          if ($this->onError) {
              try {
                  call_user_func($this->onError, $this, $code, $msg);
              } catch (\Exception $e) {
                  Worker::log($e);
                  exit(250);
              } catch (\Error $e) {
                  Worker::log($e);
                  exit(250);
              }
          }
      }
code_tokens: protected function emitError ( $ code , $ msg ) { $ this -> _status = self :: STATUS_CLOSING ; if ( $ this -> onError ) { try { call_user_func ( $ this -> onError , $ this , $ code , $ msg ) ; } catch ( \ Exception $ e ) { Worker :: log ( $ e ) ; exit ( 250 ) ; } catch ( \ Error $ e ) { Worker :: log ( $ e ) ; exit ( 250 ) ; } } }
docstring: Try to emit onError callback.
  
  @param int    $code
  @param string $msg
  @return void
docstring_tokens: Try to emit onError callback .