How to use the selianize.ParseError function in selianize

To help you get started, we’ve selected a few selianize 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 SeleniumHQ / selenium-ide / packages / selenium-ide-extension / src / neo / IO / filesystem.js View on Github external
}).catch(err => {
      const markdown = ParseError((err && err.message) || err)
      ModalState.showAlert({
        title: 'Error saving project',
        description: markdown,
        confirmLabel: 'download log',
        cancelLabel: 'close',
      }).then(choseDownload => {
        if (choseDownload) {
          browser.downloads.download({
            filename: project.name + '-logs.md',
            url: createBlob('text/markdown', markdown),
            saveAs: true,
            conflictAction: 'overwrite',
          })
        }
      })
      return Promise.reject()
github SeleniumHQ / selenium-ide / packages / selenium-ide / src / neo / IO / filesystem.js View on Github external
return Selianize(project, { silenceErrors: true, skipStdLibEmitting: true }).catch(err => {
      const markdown = ParseError(err && err.message || err);
      ModalState.showAlert({
        title: "Error saving project",
        description: markdown,
        confirmLabel: "Download log",
        cancelLabel: "Close"
      }, (choseDownload) => {
        if (choseDownload) {
          browser.downloads.download({
            filename: project.name + "-logs.md",
            url: createBlob("text/markdown", markdown),
            saveAs: true,
            conflictAction: "overwrite"
          });
        }
      });
      return Promise.reject();