How to use the @tarojs/mobx-common.errorsReporter.emit function in @tarojs/mobx-common

To help you get started, we’ve selected a few @tarojs/mobx-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NervJS / taro / packages / taro-mobx-h5 / src / observer.js View on Github external
this.componentWillReact && this.componentWillReact()
        this.forceUpdate()
      })
    }

    let result
    let exception
    this._reaction.track(() => {
      try {
        result = originRender.call(this, null, null, args[2])
      } catch (e) {
        exception = e
      }
    })
    if (exception) {
      errorsReporter.emit(exception)
      throw exception
    }
    return result
  }
github NervJS / taro / packages / taro-mobx / src / observer.js View on Github external
target._createData = function (...args) {
    let result
    let exception
    if (this._reaction instanceof Reaction) {
      this._reaction.track(() => {
        try {
          result = originRender.call(this, null, null, args[2])
        } catch (e) {
          exception = e
        }
      })
    } else {
      result = originRender.call(this, null, null, args[2])
    }
    if (exception) {
      errorsReporter.emit(exception)
      throw exception
    }
    return result
  }