digamos el método de lanzamiento si no se encuentra el ejecutable, arrojará el error con el tipo de cadena. por qué no objeta { message: 'Error failed', additionalInfo: 'trouble', executablePath: 'c:/' } . sucede al método casi titiritero. así que necesito reemplazarlo.
Error: ¡Error al iniciar el proceso del navegador! spawn H:/WebGame/GoogleChrome/chromess.exe RESOLUCIÓN DE PROBLEMAS DE ENOENT: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
en cambio, debajo de las formas.
class CustomError extends Error { constructor(executablePath) { super() this.message = 'Error: Failed to launch the browser process!'; this.executablePath = executablePath; } } class Application { constructor() { this.browser; } async launch(options) { try { this.browser = await puppeteer.launch(); return this.browser } catch(e) { throw new CustomError(options.executablePath) } } async close() await this.browser.close() }simplemente hay que reemplazar el error?