public handleErrors()

in src/errors/vue.ts [29:51]


  public handleErrors(options: CustomReportOptions, Vue: any) {
    this.infoOpt = options;
    if (!(Vue && Vue.config)) {
      return;
    }
    Vue.config.errorHandler = (error: Error, vm: any, info: string) => {
      try {
        this.logInfo = {
          ...this.infoOpt,
          uniqueId: uuid(),
          category: ErrorsCategory.VUE_ERROR,
          grade: GradeTypeEnum.ERROR,
          errorUrl: location.href,
          message: info,
          collector: options.collector,
          stack: error.stack,
        };
        this.traceInfo();
      } catch (error) {
        throw error;
      }
    };
  }